Skip to content

Commit

Permalink
C++ API: (Scalar) made the to_string() method constant
Browse files Browse the repository at this point in the history
  • Loading branch information
alixdamman committed Oct 25, 2023
1 parent 86311c3 commit 1c3c37f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cpp_api/objects/scalar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ Scalar::Scalar(const Scalar& scalar)
this->std = scalar.std;
}

std::string Scalar::to_string()
std::string Scalar::to_string() const
{
return "Scalar(" + std::to_string(val) + ", " + std::to_string(relax) + ", " + std::to_string(std) + ")";
}
Expand Down
2 changes: 1 addition & 1 deletion cpp_api/objects/scalar.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ struct Scalar : public SCL

Scalar(const Scalar& scalar);

std::string to_string();
std::string to_string() const;

// required to be used in std::map
Scalar& operator=(const Scalar& scalar);
Expand Down

0 comments on commit 1c3c37f

Please sign in to comment.