Skip to content

Commit b218fd3

Browse files
committed
closes #606 reserveCustomFormatSpecifiers
1 parent e493168 commit b218fd3

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

CHANGELOG.md

+3
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
- Fix documentation (see PR#597)
66
- Fix buffer underflow in getBashOutput (see PR#596)
77

8+
### Updates
9+
- Added new function `Helpers::reserveCustomFormatSpecifier` (see #606)
10+
811
## [9.95.3] - 13-10-2017
912
### Fixes
1013
- Multithreading issue fixed raised from last release at log builder

src/easylogging++.h

+5
Original file line numberDiff line numberDiff line change
@@ -3795,6 +3795,11 @@ class Helpers : base::StaticClass {
37953795
static inline const el::base::utils::CommandLineArgs* commandLineArgs(void) {
37963796
return ELPP->commandLineArgs();
37973797
}
3798+
/// @brief Reserve space for custom format specifiers for performance
3799+
/// @see std::vector::reserve
3800+
static inline void reserveCustomFormatSpecifiers(std::size_t size) {
3801+
ELPP->m_customFormatSpecifiers.reserve(size);
3802+
}
37983803
/// @brief Installs user defined format specifier and handler
37993804
static inline void installCustomFormatSpecifier(const CustomFormatSpecifier& customFormatSpecifier) {
38003805
ELPP->installCustomFormatSpecifier(customFormatSpecifier);

0 commit comments

Comments
 (0)