Skip to content

Commit 2f0533b

Browse files
committed
Fix -Wpessimizing-move and -Wabsolute-value warnings
See https://gitlab.com/Manu343726/tinyrefl/-/jobs/99151647
1 parent e77db9d commit 2f0533b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/filters.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -650,7 +650,7 @@ InternalValue SequenceAccessor::Filter(const InternalValue& baseVal, RenderConte
650650

651651
int idx = 0;
652652
for (auto& v : list)
653-
items.push_back(std::move(Item{IsEmpty(attrName) ? v : Subscript(v, attrName), idx ++}));
653+
items.push_back(Item{IsEmpty(attrName) ? v : Subscript(v, attrName), idx ++});
654654

655655
std::sort(items.begin(), items.end(), [&compType](auto& i1, auto& i2) {
656656
auto cmpRes = Apply2<visitors::BinaryMathOperation>(i1.val, i2.val, BinaryExpression::LogicalLt, compType);
@@ -819,7 +819,7 @@ struct ValueConverterImpl : visitors::BaseVisitor<>
819819
result = InternalValue(static_cast<double>(val));
820820
break;
821821
case ValueConverter::AbsMode:
822-
result = InternalValue(static_cast<int64_t>(abs(val)));
822+
result = InternalValue(static_cast<int64_t>(std::abs(val)));
823823
break;
824824
case ValueConverter::ToIntMode:
825825
case ValueConverter::RoundMode:

0 commit comments

Comments
 (0)