1 parent 1a9fc24 commit 86b9702Copy full SHA for 86b9702
1 file changed
third-party/folly/src/folly/logging/LoggerDB.cpp
@@ -22,6 +22,7 @@
22
#include <folly/Conv.h>
23
#include <folly/FileUtil.h>
24
#include <folly/String.h>
25
+#include <folly/container/Reserve.h>
26
#include <folly/logging/LogCategory.h>
27
#include <folly/logging/LogConfig.h>
28
#include <folly/logging/LogHandler.h>
@@ -337,6 +338,7 @@ std::vector<std::shared_ptr<LogHandler>> LoggerDB::buildCategoryHandlerList(
337
338
StringPiece categoryName,
339
const std::vector<std::string>& categoryHandlerNames) {
340
std::vector<std::shared_ptr<LogHandler>> catHandlers;
341
+ folly::grow_capacity_by(catHandlers, categoryHandlerNames.size());
342
for (const auto& handlerName : categoryHandlerNames) {
343
auto iter = handlerMap.find(handlerName);
344
if (iter == handlerMap.end()) {
0 commit comments