From 8b08d7d266042c6c1d58e1772c88209940ba3781 Mon Sep 17 00:00:00 2001 From: Tyler Wilding Date: Sun, 2 Jun 2024 13:09:48 -0400 Subject: [PATCH] lint: linter fixes --- common/repl/repl_wrapper.cpp | 2 +- common/repl/repl_wrapper.h | 2 +- goalc/compiler/compilation/Define.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/common/repl/repl_wrapper.cpp b/common/repl/repl_wrapper.cpp index 20ed742b5..fd2b517de 100644 --- a/common/repl/repl_wrapper.cpp +++ b/common/repl/repl_wrapper.cpp @@ -14,7 +14,7 @@ void Wrapper::clear_screen() { repl.clear_screen(); } -void Wrapper::print_welcome_message(const std::vector loaded_projects) { +void Wrapper::print_welcome_message(const std::vector& loaded_projects) { std::string message; message += fmt::format(fmt::emphasis::bold | fg(fmt::color::orange), " ..:::::..\n"); message += fmt::format(fmt::emphasis::bold | fg(fmt::color::orange), " .:-----------:.\n"); diff --git a/common/repl/repl_wrapper.h b/common/repl/repl_wrapper.h index a5c3318bb..6ba81ad87 100644 --- a/common/repl/repl_wrapper.h +++ b/common/repl/repl_wrapper.h @@ -38,7 +38,7 @@ class Wrapper { // Functionality / Commands void clear_screen(); void print_to_repl(const std::string& str); - void print_welcome_message(const std::vector loaded_projects); + void print_welcome_message(const std::vector& loaded_projects); void set_history_max_size(size_t len); const char* readline(const std::string& prompt); void add_to_history(const std::string& line); diff --git a/goalc/compiler/compilation/Define.cpp b/goalc/compiler/compilation/Define.cpp index 938cae69a..a2351fb27 100644 --- a/goalc/compiler/compilation/Define.cpp +++ b/goalc/compiler/compilation/Define.cpp @@ -74,7 +74,7 @@ Val* Compiler::compile_define(const goos::Object& form, const goos::Object& rest if (!existing_type) { m_symbol_types.set(sym.as_symbol(), in_gpr->type()); } else { - if (!explicit_no_typecheck && m_repl->repl_config.permissive_redefinitions) { + if (!explicit_no_typecheck && m_repl && m_repl->repl_config.permissive_redefinitions) { // Permissive redefinitions are allowed if (in_gpr->type() != *existing_type) { lg::warn("Redefining {}", sym.as_symbol().name_ptr);