mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-04 19:25:51 +00:00
Remove superfluous assert
The size of lines_ gets checked at runtime in the legacy() function below.
This commit is contained in:
committed by
Nik Bougalis
parent
15a30c745c
commit
7ca03d3bca
@@ -87,10 +87,7 @@ public:
|
|||||||
if (lines_.empty ())
|
if (lines_.empty ())
|
||||||
lines_.emplace_back (std::move (value));
|
lines_.emplace_back (std::move (value));
|
||||||
else
|
else
|
||||||
{
|
|
||||||
assert (lines_.size () == 1);
|
|
||||||
lines_[0] = std::move (value);
|
lines_[0] = std::move (value);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -104,7 +101,7 @@ public:
|
|||||||
{
|
{
|
||||||
if (lines_.empty ())
|
if (lines_.empty ())
|
||||||
return "";
|
return "";
|
||||||
else if (lines_.size () > 1)
|
if (lines_.size () > 1)
|
||||||
Throw<std::runtime_error> (
|
Throw<std::runtime_error> (
|
||||||
"A legacy value must have exactly one line. Section: " + name_);
|
"A legacy value must have exactly one line. Section: " + name_);
|
||||||
return lines_[0];
|
return lines_[0];
|
||||||
|
|||||||
Reference in New Issue
Block a user