Commit 8ad7de96 authored by Marcin Siodelski's avatar Marcin Siodelski

[2491] Use .empty() function to check if container is empty.

parent eb5b276d
......@@ -248,7 +248,7 @@ OptionDataTypeUtil::writeFqdn(const std::string& fqdn,
std::string
OptionDataTypeUtil::readString(const std::vector<uint8_t>& buf) {
std::string value;
if (buf.size() > 0) {
if (!buf.empty()) {
value.insert(value.end(), buf.begin(), buf.end());
}
return (value);
......
......@@ -173,7 +173,7 @@ OptionDefinition::optionFactory(Option::Universe u, uint16_t type,
OptionBuffer buf;
if (!array_type_ && type_ != OPT_RECORD_TYPE) {
if (values.size() == 0) {
if (values.empty()) {
isc_throw(InvalidOptionValue, "no option value specified");
}
writeToBuffer(values[0], type_, buf);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment