Skip to content

Commit

Permalink
Remove superfluous assert
Browse files Browse the repository at this point in the history
The size of lines_ gets checked at runtime in the legacy() function below.
  • Loading branch information
MarkusTeufelberger authored and nbougalis committed Feb 1, 2017
1 parent 15a30c7 commit 7ca03d3
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/ripple/basics/BasicConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,7 @@ class Section
if (lines_.empty ())
lines_.emplace_back (std::move (value));
else
{
assert (lines_.size () == 1);
lines_[0] = std::move (value);
}
}

/**
Expand All @@ -104,7 +101,7 @@ class Section
{
if (lines_.empty ())
return "";
else if (lines_.size () > 1)
if (lines_.size () > 1)
Throw<std::runtime_error> (
"A legacy value must have exactly one line. Section: " + name_);
return lines_[0];
Expand Down

0 comments on commit 7ca03d3

Please sign in to comment.