BIND 10 trac2491, updated. 8ad7de967cfee9788fa269640f1ce9e0d302ee04 [2491] Use .empty() function to check if container is empty.

BIND 10 source code commits bind10-changes at lists.isc.org
Mon Dec 10 19:26:35 UTC 2012


The branch, trac2491 has been updated
       via  8ad7de967cfee9788fa269640f1ce9e0d302ee04 (commit)
      from  eb5b276de3dc4c556c818ebfab63a14bf2f562eb (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 8ad7de967cfee9788fa269640f1ce9e0d302ee04
Author: Marcin Siodelski <marcin at isc.org>
Date:   Mon Dec 10 20:26:05 2012 +0100

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

-----------------------------------------------------------------------

Summary of changes:
 src/lib/dhcp/option_data_types.cc |    2 +-
 src/lib/dhcp/option_definition.cc |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

-----------------------------------------------------------------------
diff --git a/src/lib/dhcp/option_data_types.cc b/src/lib/dhcp/option_data_types.cc
index ce6f8c2..0c512d7 100644
--- a/src/lib/dhcp/option_data_types.cc
+++ b/src/lib/dhcp/option_data_types.cc
@@ -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);
diff --git a/src/lib/dhcp/option_definition.cc b/src/lib/dhcp/option_definition.cc
index 7ed48e4..2248bd7 100644
--- a/src/lib/dhcp/option_definition.cc
+++ b/src/lib/dhcp/option_definition.cc
@@ -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);



More information about the bind10-changes mailing list