summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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();
}