Skip to content

Commit 6351a14

Browse files
committed
preprocessor.cpp: replaced fixed size std::vector with std::array
1 parent 1ecd763 commit 6351a14

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

lib/preprocessor.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
#include "suppressions.h"
2929

3030
#include <algorithm>
31+
#include <array>
3132
#include <cstddef>
3233
#include <iterator> // back_inserter
3334
#include <memory>
@@ -417,7 +418,7 @@ static void getConfigs(const simplecpp::TokenList &tokens, std::set<std::string>
417418
if (cmdtok->str() == "ifndef")
418419
ifndef = true;
419420
else {
420-
const std::vector<std::string> match{"if", "!", "defined", "(", config, ")"};
421+
const std::array<std::string, 6> match{"if", "!", "defined", "(", config, ")"};
421422
int i = 0;
422423
ifndef = true;
423424
for (const simplecpp::Token *t = cmdtok; i < match.size(); t = t->next) {

0 commit comments

Comments
 (0)