8000 Merge pull request #321 from VishtakAlexey/1.2.x · log4cplus/log4cplus@58169a3 · GitHub
[go: up one dir, main page]

Skip to content

Commit 58169a3

Browse files
authored
Merge pull request #321 from VishtakAlexey/1.2.x
Optimization of getFormattedTime in ~two times
2 parents 2b664e8 + 849d6d7 commit 58169a3

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/timehelper.cxx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,8 @@ Time::getFormattedTime(const log4cplus::tstring& fmt_orig, bool use_gmtime) cons
359359
// without changing errno.
360360
std::size_t const buffer_size_max
361361
= (std::max) (static_cast<std::size_t>(1024), buffer_size * 16);
362+
363+
buffer_size = (std::max) (buffer_size, gft_sp.buffer.capacity());
362364

363365
do
364366
{

0 commit comments

Comments
 (0)
0