diff options
Diffstat (limited to 'src/lib/asn1')
-rw-r--r-- | src/lib/asn1/asn1_alt_name.cpp | 4 | ||||
-rw-r--r-- | src/lib/asn1/asn1_oid.cpp | 2 | ||||
-rw-r--r-- | src/lib/asn1/oid_lookup/oids.cpp | 4 | ||||
-rw-r--r-- | src/lib/asn1/x509_dn.cpp | 2 |
4 files changed, 6 insertions, 6 deletions
diff --git a/src/lib/asn1/asn1_alt_name.cpp b/src/lib/asn1/asn1_alt_name.cpp index 9e59321f7..131152521 100644 --- a/src/lib/asn1/asn1_alt_name.cpp +++ b/src/lib/asn1/asn1_alt_name.cpp @@ -55,7 +55,7 @@ AlternativeName::AlternativeName(const std::string& email_addr, void AlternativeName::add_attribute(const std::string& type, const std::string& str) { - if(type == "" || str == "") + if(type.empty() || str.empty()) return; auto range = alt_info.equal_range(type); @@ -72,7 +72,7 @@ void AlternativeName::add_attribute(const std::string& type, void AlternativeName::add_othername(const OID& oid, const std::string& value, ASN1_Tag type) { - if(value == "") + if(value.empty()) return; multimap_insert(othernames, oid, ASN1_String(value, type)); } diff --git a/src/lib/asn1/asn1_oid.cpp b/src/lib/asn1/asn1_oid.cpp index 2fbc4b27c..3232d24e6 100644 --- a/src/lib/asn1/asn1_oid.cpp +++ b/src/lib/asn1/asn1_oid.cpp @@ -18,7 +18,7 @@ namespace Botan { */ OID::OID(const std::string& oid_str) { - if(oid_str != "") + if(!oid_str.empty()) { try { diff --git a/src/lib/asn1/oid_lookup/oids.cpp b/src/lib/asn1/oid_lookup/oids.cpp index 8ce0ec644..0d1ab58ff 100644 --- a/src/lib/asn1/oid_lookup/oids.cpp +++ b/src/lib/asn1/oid_lookup/oids.cpp @@ -109,12 +109,12 @@ void OID_Map::read_cfg(std::istream& cfg, const std::string& source) std::getline(cfg, s); ++line; - if(s == "" || s[0] == '#') + if(s.empty() || s[0] == '#') continue; s = clean_ws(s.substr(0, s.find('#'))); - if(s == "") + if(s.empty()) continue; auto eq = s.find("="); diff --git a/src/lib/asn1/x509_dn.cpp b/src/lib/asn1/x509_dn.cpp index ff4a73ebb..80bbe81a3 100644 --- a/src/lib/asn1/x509_dn.cpp +++ b/src/lib/asn1/x509_dn.cpp @@ -55,7 +55,7 @@ void X509_DN::add_attribute(const std::string& type, */ void X509_DN::add_attribute(const OID& oid, const std::string& str) { - if(str == "") + if(str.empty()) return; auto range = dn_info.equal_range(oid); |