Skip to content

Commit

Permalink
chore: implement fixes to address SonarCloud complaints
Browse files Browse the repository at this point in the history
  • Loading branch information
jacopodl committed Jan 25, 2024
1 parent 5fc88e7 commit 2ba926f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions argon/vm/datatype/arobject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ ArObject *MROSearch(const TypeInfo *type, ArObject *key, AttributeProperty *apro
return nullptr;
}

ArObject *argon::vm::datatype::Repr(const ArObject *object) {
ArObject *argon::vm::datatype::Repr(ArObject *object) {
ArObject *args[1]{};

auto repr = AR_GET_TYPE(object)->repr;
Expand Down Expand Up @@ -467,7 +467,7 @@ ArObject *argon::vm::datatype::Repr(const ArObject *object) {
return (ArObject *) StringFormat("<object %s @%p>", AR_TYPE_NAME(object), object);
}

args[0] = (ArObject *) object;
args[0] = object;

auto *result = EvalRaiseError(rfunc, args, 1, OpCodeCallMode::FASTCALL);

Expand Down Expand Up @@ -521,7 +521,7 @@ ArObject *argon::vm::datatype::Str(ArObject *object) {
return Repr(object);
}

args[0] = (ArObject *) object;
args[0] = object;

auto *result = EvalRaiseError(sfunc, args, 1, OpCodeCallMode::FASTCALL);

Expand Down
2 changes: 1 addition & 1 deletion argon/vm/datatype/arobject.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ namespace argon::vm::datatype {

ArObject *IteratorNext(ArObject *iterator);

ArObject *Repr(const ArObject *object);
ArObject *Repr(ArObject *object);

ArObject *Str(ArObject *object);

Expand Down
2 changes: 1 addition & 1 deletion argon/vm/datatype/support/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ namespace argon::vm::datatype::support {
ArObject *ret = *list;

for (ArSize i = 1; i < length; i++) {
auto *res = Compare(ret, list[i], mode);
const auto *res = Compare(ret, list[i], mode);
if (res == nullptr)
return false;

Expand Down

0 comments on commit 2ba926f

Please sign in to comment.