mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-22 15:30:40 +08:00
Mark parser_t::principal as const
This commit is contained in:
parent
4f466cb916
commit
0c06ca3c3f
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue
Block a user