Skip to content

Commit

Permalink
refactor(configuration): prefer Vector over std::vector
Browse files Browse the repository at this point in the history
Reduce our use of std::vector to reduce binary bloat:
#689
  • Loading branch information
strager committed Nov 21, 2023
1 parent d2d7f46 commit 70c1740
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/quick-lint-js/configuration/configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include <optional>
#include <quick-lint-js/container/monotonic-allocator.h>
#include <quick-lint-js/container/padded-string.h>
#include <quick-lint-js/container/vector.h>
#include <quick-lint-js/fe/global-declared-variable-set.h>
#include <quick-lint-js/fe/global-variables.h>
#include <quick-lint-js/port/char8.h>
Expand Down Expand Up @@ -49,7 +50,8 @@ class Configuration {

Monotonic_Allocator allocator_{"Configuration::allocator_"};
Global_Declared_Variable_Set globals_;
std::vector<String8_View> globals_to_remove_;
Vector<String8_View> globals_to_remove_{"Configuration::globals_to_remove_",
&this->allocator_};
bool did_add_globals_from_groups_ = false;
std::array<bool, global_group_count> enabled_global_groups_;
bool literally_anything_global_group_enabled_ = false;
Expand Down

0 comments on commit 70c1740

Please sign in to comment.