Skip to content

Commit 2ba926f

Browse files
committed
chore: implement fixes to address SonarCloud complaints
1 parent 5fc88e7 commit 2ba926f

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

argon/vm/datatype/arobject.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,7 @@ ArObject *MROSearch(const TypeInfo *type, ArObject *key, AttributeProperty *apro
436436
return nullptr;
437437
}
438438

439-
ArObject *argon::vm::datatype::Repr(const ArObject *object) {
439+
ArObject *argon::vm::datatype::Repr(ArObject *object) {
440440
ArObject *args[1]{};
441441

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

470-
args[0] = (ArObject *) object;
470+
args[0] = object;
471471

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

@@ -521,7 +521,7 @@ ArObject *argon::vm::datatype::Str(ArObject *object) {
521521
return Repr(object);
522522
}
523523

524-
args[0] = (ArObject *) object;
524+
args[0] = object;
525525

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

argon/vm/datatype/arobject.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ namespace argon::vm::datatype {
2828

2929
ArObject *IteratorNext(ArObject *iterator);
3030

31-
ArObject *Repr(const ArObject *object);
31+
ArObject *Repr(ArObject *object);
3232

3333
ArObject *Str(ArObject *object);
3434

argon/vm/datatype/support/common.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ namespace argon::vm::datatype::support {
149149
ArObject *ret = *list;
150150

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

0 commit comments

Comments
 (0)