From 3d7024b508b8f2a5c4376d14cc942f3303d8d6da Mon Sep 17 00:00:00 2001 From: blueloveTH Date: Thu, 1 Feb 2024 13:43:47 +0800 Subject: [PATCH] some optimize --- src/error.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/error.cpp b/src/error.cpp index 21a80b9e..f57aa27e 100644 --- a/src/error.cpp +++ b/src/error.cpp @@ -7,7 +7,7 @@ namespace pkpy{ // Skip utf8 BOM if there is any. if (strncmp(source.data(), "\xEF\xBB\xBF", 3) == 0) index += 3; // Drop all '\r' - SStream ss; + SStream ss(source.size()); while(index < source.size()){ if(source[index] != '\r') ss << source[index]; index++;