From dfa4b2fefacc60d43e8b94dc09ccecad4c4d5baf Mon Sep 17 00:00:00 2001 From: Alexander Smorkalov Date: Tue, 18 Dec 2012 15:58:17 +0400 Subject: [PATCH] Workaround for gcc overoptimization compiler bug. --- modules/core/src/persistence.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/core/src/persistence.cpp b/modules/core/src/persistence.cpp index 35f1e9a8e..99d46c298 100644 --- a/modules/core/src/persistence.cpp +++ b/modules/core/src/persistence.cpp @@ -5200,6 +5200,7 @@ void FileStorage::release() string FileStorage::releaseAndGetString() { string buf; + buf.reserve(16); // HACK: Work around for compiler bug if( fs.obj && fs.obj->outbuf ) icvClose(fs.obj, &buf);