Skip to content

Commit

Permalink
Correct use of std::move + rm Project.h
Browse files Browse the repository at this point in the history
  • Loading branch information
SPauly committed Aug 27, 2024
1 parent c6ecd3f commit eaff08f
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 301 deletions.
2 changes: 1 addition & 1 deletion include/spauly/vccore/impl/math.h
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ class PolynomialFunc : public ParameterisedBaseFunc<T, S> {
--inverse_iter;
}

return std::move(y);
return y;
}
};

Expand Down
8 changes: 4 additions & 4 deletions src/calculator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ CorrectionFactors Calculator::Calculate(const Parameters& p,

// Validate the Input
out.error_flag = ValidateInput(p_base);
if (out.error_flag != 0) return std::move(out);
if (out.error_flag != 0) return out;

// Map the input values to the scales.
double flow_pos = FitToScale(kFlowrateScale, p_base.flowrate, 0);
Expand Down Expand Up @@ -81,7 +81,7 @@ CorrectionFactors Calculator::Calculate(const Parameters& p,
}
}

return std::move(out);
return out;
}

Parameters Calculator::GetConverted(const Parameters& p,
Expand All @@ -99,7 +99,7 @@ Parameters Calculator::GetConverted(const Parameters& p,
out.density =
impl::ConvertToBaseUnit<DensityUnit>(impl::DoubleT(p.density), u.density);

return std::move(out);
return out;
}

const size_t Calculator::ValidateInput(const Parameters& p) const noexcept {
Expand All @@ -117,7 +117,7 @@ const size_t Calculator::ValidateInput(const Parameters& p) const noexcept {
errors |= ErrorFlag::kViscosityError;
}

return std::move(errors);
return errors;
}

const double Calculator::FitToScale(
Expand Down
295 changes: 0 additions & 295 deletions src/project.cpp

This file was deleted.

2 changes: 1 addition & 1 deletion testing/conversion_functions_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ std::string ConversionHelper(TestCasesMap& cases, _Unit from) {
}
}

return std::move(errors);
return errors;
}

TEST(ConversionFunctions, liters_per_minute) {
Expand Down

0 comments on commit eaff08f

Please sign in to comment.