diff options
author | George Hazan <ghazan@miranda.im> | 2020-06-25 19:15:24 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2020-06-25 19:15:24 +0300 |
commit | 648729e8dd7fca6ede8dad8c49bb7f5531073910 (patch) | |
tree | 9437c0c5bf05fd545f415bc813d94b2a4a3673d5 /plugins/New_GPG/src/utilities.cpp | |
parent | ca9289cc51c5ed348d58d06db5a31f908cb8b5ba (diff) |
New_GPG: code cleaning
Diffstat (limited to 'plugins/New_GPG/src/utilities.cpp')
-rwxr-xr-x | plugins/New_GPG/src/utilities.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/plugins/New_GPG/src/utilities.cpp b/plugins/New_GPG/src/utilities.cpp index b9b23a8dc1..058e4db6ab 100755 --- a/plugins/New_GPG/src/utilities.cpp +++ b/plugins/New_GPG/src/utilities.cpp @@ -1221,14 +1221,12 @@ void fix_line_term(std::string &s) { if (s.empty()) return; + boost::algorithm::erase_all(s, "\r\r"); -} -void fix_line_term(std::wstring &s) -{ - if (s.empty()) - return; - boost::algorithm::erase_all(s, L"\r\r"); + // unified line endings for unix & windows port + boost::algorithm::replace_all(s, "\r\n", "\n"); + boost::algorithm::replace_all(s, "\n", "\r\n"); } void strip_line_term(std::wstring &s) @@ -1247,7 +1245,7 @@ void strip_line_term(std::string &s) boost::algorithm::erase_all(s, "\n"); } -void strip_tags(std::wstring &str) +void strip_tags(std::string &str) { if (str.empty()) return; |