aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/misc
diff options
context:
space:
mode:
authorSimon Warta <[email protected]>2015-09-22 23:13:08 +0200
committerSimon Warta <[email protected]>2015-09-22 23:13:08 +0200
commit1f62dbcd0108a2cd99ad473299e041163a638b1c (patch)
treefb74d95411c5f8c41ca7f409cfc8d36513023363 /src/lib/misc
parentac9689990da914cd58788dab9d5e0d7bebb72e30 (diff)
Avoid concatination of chars
Ever tried? auto str = "some long string"; auto str2 = str + '\n'; It's not with the brainfuck finding the bug.
Diffstat (limited to 'src/lib/misc')
-rw-r--r--src/lib/misc/openpgp/openpgp.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/misc/openpgp/openpgp.cpp b/src/lib/misc/openpgp/openpgp.cpp
index 3a464d906..f42ce875e 100644
--- a/src/lib/misc/openpgp/openpgp.cpp
+++ b/src/lib/misc/openpgp/openpgp.cpp
@@ -28,16 +28,16 @@ std::string PGP_encode(
std::string pgp_encoded = PGP_HEADER;
if(headers.find("Version") != headers.end())
- pgp_encoded += "Version: " + headers.find("Version")->second + '\n';
+ pgp_encoded += "Version: " + headers.find("Version")->second + "\n";
std::map<std::string, std::string>::const_iterator i = headers.begin();
while(i != headers.end())
{
if(i->first != "Version")
- pgp_encoded += i->first + ": " + i->second + '\n';
+ pgp_encoded += i->first + ": " + i->second + "\n";
++i;
}
- pgp_encoded += '\n';
+ pgp_encoded += "\n";
Pipe pipe(new Fork(
new Base64_Encoder(true, PGP_WIDTH),
@@ -48,7 +48,7 @@ std::string PGP_encode(
pipe.process_msg(input, length);
pgp_encoded += pipe.read_all_as_string(0);
- pgp_encoded += '=' + pipe.read_all_as_string(1) + '\n';
+ pgp_encoded += "=" + pipe.read_all_as_string(1) + "\n";
pgp_encoded += PGP_TRAILER;
return pgp_encoded;