Skip to content

Commit

Permalink
fixup!
Browse files Browse the repository at this point in the history
Signed-off-by: Jeremy Nimmer <[email protected]>
  • Loading branch information
jwnimmer-tri committed Jan 6, 2025
1 parent 9b70401 commit e829fc4
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 48 deletions.
12 changes: 6 additions & 6 deletions include/gz/math/PiecewiseScalarField3.hh
Original file line number Diff line number Diff line change
Expand Up @@ -78,23 +78,23 @@ namespace gz::math
{
if (pieces[i].region.Empty())
{
std::ostringstream error_str;
error_str << "Region #" << i << " (" << pieces[i].region
std::ostringstream errStream;
errStream << "Region #" << i << " (" << pieces[i].region
<< ") in piecewise scalar field definition is empty.";
detail::LogErrorMessage(error_str.str());
detail::LogErrorMessage(errStream.str());
}
for (size_t j = i + 1; j < pieces.size(); ++j)
{
if (pieces[i].region.Intersects(pieces[j].region))
{
std::ostringstream error_str;
error_str << "Detected overlap between regions in "
std::ostringstream errStream;
errStream << "Detected overlap between regions in "
<< "piecewise scalar field definition: "
<< "region #" << i << " (" << pieces[i].region
<< ") overlaps with region #" << j << " ("
<< pieces[j].region << "). Region #" << i
<< " will take precedence when overlapping.";
detail::LogErrorMessage(error_str.str());
detail::LogErrorMessage(errStream.str());
}
}
}
Expand Down
12 changes: 6 additions & 6 deletions include/gz/math/graph/Graph.hh
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,9 @@ namespace graph
{
if (!this->AddVertex(v.Name(), v.Data(), v.Id()).Valid())
{
std::ostringstream error_str;
error_str << "Invalid vertex with Id [" << v.Id() << "]. Ignoring.";
detail::LogErrorMessage(error_str.str());
std::ostringstream errStream;
errStream << "Invalid vertex with Id [" << v.Id() << "]. Ignoring.";
detail::LogErrorMessage(errStream.str());
}
}

Expand Down Expand Up @@ -163,9 +163,9 @@ namespace graph
// The Id already exists.
if (!ret.second)
{
std::ostringstream error_str;
error_str << "[Graph::AddVertex()] Repeated vertex [" << id << "]";
detail::LogErrorMessage(error_str.str());
std::ostringstream errStream;
errStream << "[Graph::AddVertex()] Repeated vertex [" << id << "]";
detail::LogErrorMessage(errStream.str());
return NullVertex<V>();
}

Expand Down
12 changes: 6 additions & 6 deletions include/gz/math/graph/GraphAlgorithms.hh
Original file line number Diff line number Diff line change
Expand Up @@ -218,19 +218,19 @@ namespace graph
// Sanity check: The source vertex should exist.
if (allVertices.find(_from) == allVertices.end())
{
std::ostringstream error_str;
error_str << "Vertex [" << _from << "] Not found";
detail::LogErrorMessage(error_str.str());
std::ostringstream errStream;
errStream << "Vertex [" << _from << "] Not found";
detail::LogErrorMessage(errStream.str());
return {};
}

// Sanity check: The destination vertex should exist (if used).
if (_to != kNullId &&
allVertices.find(_to) == allVertices.end())
{
std::ostringstream error_str;
error_str << "Vertex [" << _from << "] Not found";
detail::LogErrorMessage(error_str.str());
std::ostringstream errStream;
errStream << "Vertex [" << _from << "] Not found";
detail::LogErrorMessage(errStream.str());
return {};
}

Expand Down
12 changes: 6 additions & 6 deletions src/Kmeans.cc
Original file line number Diff line number Diff line change
Expand Up @@ -79,20 +79,20 @@ bool Kmeans::Cluster(int _k,

if (_k <= 0)
{
std::ostringstream error_str;
error_str << "Kmeans error: The number of clusters has to"
std::ostringstream errStream;
errStream << "Kmeans error: The number of clusters has to"
<< " be positive but its value is [" << _k << "]";
detail::LogErrorMessage(error_str.str());
detail::LogErrorMessage(errStream.str());
return false;
}

if (_k > static_cast<int>(this->dataPtr->obs.size()))
{
std::ostringstream error_str;
error_str << "Kmeans error: The number of clusters [" << _k << "] has to be"
std::ostringstream errStream;
errStream << "Kmeans error: The number of clusters [" << _k << "] has to be"
<< " lower or equal to the number of observations ["
<< this->dataPtr->obs.size() << "]";
detail::LogErrorMessage(error_str.str());
detail::LogErrorMessage(errStream.str());
return false;
}

Expand Down
12 changes: 6 additions & 6 deletions src/SignalStats.cc
Original file line number Diff line number Diff line change
Expand Up @@ -264,11 +264,11 @@ bool SignalStats::InsertStatistic(const std::string &_name)
auto map = this->Map();
if (map.find(_name) != map.end())
{
std::ostringstream error_str;
error_str << "Unable to InsertStatistic ["
std::ostringstream errStream;
errStream << "Unable to InsertStatistic ["
<< _name
<< "] since it has already been inserted.";
detail::LogErrorMessage(error_str.str());
detail::LogErrorMessage(errStream.str());
return false;
}
}
Expand Down Expand Up @@ -301,11 +301,11 @@ bool SignalStats::InsertStatistic(const std::string &_name)
else
{
// Unrecognized name string
std::ostringstream error_str;
error_str << "Unable to InsertStatistic ["
std::ostringstream errStream;
errStream << "Unable to InsertStatistic ["
<< _name
<< "] since it is an unrecognized name.";
detail::LogErrorMessage(error_str.str());
detail::LogErrorMessage(errStream.str());
return false;
}
this->dataPtr->stats.push_back(stat);
Expand Down
36 changes: 18 additions & 18 deletions src/SphericalCoordinates.cc
Original file line number Diff line number Diff line change
Expand Up @@ -291,9 +291,9 @@ void SphericalCoordinates::SetSurface(const SurfaceType &_type)
}
default:
{
std::ostringstream error_str;
error_str << "Unknown surface type[" << this->dataPtr->surfaceType << "]";
detail::LogErrorMessage(error_str.str());
std::ostringstream errStream;
errStream << "Unknown surface type[" << this->dataPtr->surfaceType << "]";
detail::LogErrorMessage(errStream.str());
break;
}
}
Expand All @@ -309,9 +309,9 @@ void SphericalCoordinates::SetSurface(
(_type != MOON_SCS) &&
(_type != CUSTOM_SURFACE))
{
std::ostringstream error_str;
error_str << "Unknown surface type[" << _type << "]";
detail::LogErrorMessage(error_str.str());
std::ostringstream errStream;
errStream << "Unknown surface type[" << _type << "]";
detail::LogErrorMessage(errStream.str());
return;
}

Expand Down Expand Up @@ -647,9 +647,9 @@ std::optional<CoordinateVector3> PositionTransformTmp(
break;
default:
{
std::ostringstream error_str;
error_str << "Invalid coordinate type[" << _in << "]";
detail::LogErrorMessage(error_str.str());
std::ostringstream errStream;
errStream << "Invalid coordinate type[" << _in << "]";
detail::LogErrorMessage(errStream.str());
return std::nullopt;
}
}
Expand Down Expand Up @@ -711,9 +711,9 @@ std::optional<CoordinateVector3> PositionTransformTmp(

default:
{
std::ostringstream error_str;
error_str << "Unknown coordinate type[" << _out << "]";
detail::LogErrorMessage(error_str.str());
std::ostringstream errStream;
errStream << "Unknown coordinate type[" << _out << "]";
detail::LogErrorMessage(errStream.str());
return std::nullopt;
}
}
Expand Down Expand Up @@ -820,9 +820,9 @@ std::optional<CoordinateVector3> VelocityTransformTmp(
break;
default:
{
std::ostringstream error_str;
error_str << "Unknown coordinate type[" << _in << "]";
detail::LogErrorMessage(error_str.str());
std::ostringstream errStream;
errStream << "Unknown coordinate type[" << _in << "]";
detail::LogErrorMessage(errStream.str());
return std::nullopt;
}
}
Expand Down Expand Up @@ -857,9 +857,9 @@ std::optional<CoordinateVector3> VelocityTransformTmp(

default:
{
std::ostringstream error_str;
error_str << "Unknown coordinate type[" << _out << "]";
detail::LogErrorMessage(error_str.str());
std::ostringstream errStream;
errStream << "Unknown coordinate type[" << _out << "]";
detail::LogErrorMessage(errStream.str());
return std::nullopt;
}
}
Expand Down

0 comments on commit e829fc4

Please sign in to comment.