diff options
author | lloyd <[email protected]> | 2006-06-23 10:44:40 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2006-06-23 10:44:40 +0000 |
commit | 8b1c1c4885aa921d73048312ff31517b3ca18a8b (patch) | |
tree | 8df1461e5da3d112947417ecbe223e1b7112ef37 /src/parsing.cpp | |
parent | 571fea5ac667b88a66604ecdba05d8324f5e9de7 (diff) |
Use std::string::clear() rather than assign the empty string when
we want to remove the current contents of a string object.
Diffstat (limited to 'src/parsing.cpp')
-rw-r--r-- | src/parsing.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/parsing.cpp b/src/parsing.cpp index 4939cd082..99d4205ea 100644 --- a/src/parsing.cpp +++ b/src/parsing.cpp @@ -98,7 +98,7 @@ std::vector<std::string> parse_algorithm_name(const std::string& namex) elems.push_back(substring.substr(1)); else elems.push_back(substring); - substring = ""; + substring.clear(); } else substring += c; @@ -125,7 +125,7 @@ std::vector<std::string> split_on(const std::string& str, char delim) { if(substr != "") elems.push_back(substr); - substr = ""; + substr.clear(); } else substr += *j; @@ -155,7 +155,7 @@ std::vector<u32bit> parse_asn1_oid(const std::string& oid) if(substring == "") throw Invalid_OID(oid); oid_elems.push_back(to_u32bit(substring)); - substring = ""; + substring.clear(); } else substring += c; |