mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-21 11:31:15 -03:00
Mark parser_t::principal as const
This commit is contained in:
@@ -97,7 +97,7 @@ parser_t::parser_t() : parser_t(env_stack_t::principal_ref()) {}
|
||||
// Out of line destructor to enable forward declaration of parse_execution_context_t
|
||||
parser_t::~parser_t() = default;
|
||||
|
||||
std::shared_ptr<parser_t> parser_t::principal{new parser_t()};
|
||||
const std::shared_ptr<parser_t> parser_t::principal{new parser_t()};
|
||||
|
||||
parser_t &parser_t::principal_parser() {
|
||||
ASSERT_IS_MAIN_THREAD();
|
||||
|
||||
@@ -283,7 +283,7 @@ class parser_t : public std::enable_shared_from_this<parser_t> {
|
||||
parser_t(std::shared_ptr<env_stack_t> vars);
|
||||
|
||||
/// The main parser.
|
||||
static std::shared_ptr<parser_t> principal;
|
||||
static const std::shared_ptr<parser_t> principal;
|
||||
|
||||
public:
|
||||
// No copying allowed.
|
||||
|
||||
Reference in New Issue
Block a user