summaryrefslogtreecommitdiff
path: root/datatest.cpp
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2021-03-19 19:19:02 -0400
committerJeffrey Walton <noloader@gmail.com>2021-03-19 19:19:02 -0400
commit93c4fc2b8adb25d324101e50f7f71c9cb74fc7c3 (patch)
treefac04e5e0a9de25efbb2af315080cfcf22318585 /datatest.cpp
parent851d355f5b8e8b43722abe57950858b4d61c374a (diff)
downloadcryptopp-git-93c4fc2b8adb25d324101e50f7f71c9cb74fc7c3.tar.gz
Update datatest.cpp
Diffstat (limited to 'datatest.cpp')
-rw-r--r--datatest.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/datatest.cpp b/datatest.cpp
index 191e23f5..a6e3b8d9 100644
--- a/datatest.cpp
+++ b/datatest.cpp
@@ -79,8 +79,12 @@ bool Readline(std::istream& stream, std::string& line)
line.push_back(static_cast<char>(ch));
}
+#if defined(CRYPTOPP_CXX11)
+ line.shrink_to_fit();
+#else
// Non-binding shrink to fit
line.reserve(0);
+#endif
return !stream.fail();
}