Skip to content

Commit 86b9702

Browse files
generatedunixname1667983331310996meta-codesync[bot]
authored andcommitted
fbcode/folly/logging/LoggerDB.cpp
Reviewed By: DenisYaroshevskiy Differential Revision: D92294976 fbshipit-source-id: 509041aa17365c1eb49a64d71d67fe9182d7a919
1 parent 1a9fc24 commit 86b9702

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

third-party/folly/src/folly/logging/LoggerDB.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
#include <folly/Conv.h>
2323
#include <folly/FileUtil.h>
2424
#include <folly/String.h>
25+
#include <folly/container/Reserve.h>
2526
#include <folly/logging/LogCategory.h>
2627
#include <folly/logging/LogConfig.h>
2728
#include <folly/logging/LogHandler.h>
@@ -337,6 +338,7 @@ std::vector<std::shared_ptr<LogHandler>> LoggerDB::buildCategoryHandlerList(
337338
StringPiece categoryName,
338339
const std::vector<std::string>& categoryHandlerNames) {
339340
std::vector<std::shared_ptr<LogHandler>> catHandlers;
341+
folly::grow_capacity_by(catHandlers, categoryHandlerNames.size());
340342
for (const auto& handlerName : categoryHandlerNames) {
341343
auto iter = handlerMap.find(handlerName);
342344
if (iter == handlerMap.end()) {

0 commit comments

Comments
 (0)