diff --git a/source/code/code.cpp b/source/code/code.cpp index a42e8a8..d496605 100644 --- a/source/code/code.cpp +++ b/source/code/code.cpp @@ -9,7 +9,7 @@ #include #include -auto operator<<(std::ostream& ostream, const opcodes& opcode) -> std::ostream& +auto operator<<(std::ostream& ostream, opcodes opcode) -> std::ostream& { using enum opcodes; switch (opcode) { diff --git a/source/code/code.hpp b/source/code/code.hpp index ec093da..1569b30 100644 --- a/source/code/code.hpp +++ b/source/code/code.hpp @@ -45,7 +45,7 @@ enum class opcodes : uint8_t current_closure, }; -auto operator<<(std::ostream& ostream, const opcodes& opcode) -> std::ostream&; +auto operator<<(std::ostream& ostream, opcodes opcode) -> std::ostream&; using operands = std::vector; using instructions = std::vector; diff --git a/source/lexer/token_type.cpp b/source/lexer/token_type.cpp index bad9cb6..0afa0cc 100644 --- a/source/lexer/token_type.cpp +++ b/source/lexer/token_type.cpp @@ -1,6 +1,6 @@ #include "token_type.hpp" -auto operator<<(std::ostream& ostream, const token_type& type) -> std::ostream& +auto operator<<(std::ostream& ostream, token_type type) -> std::ostream& { switch (type) { case token_type::asterisk: diff --git a/source/lexer/token_type.hpp b/source/lexer/token_type.hpp index ab5c16a..df9676d 100644 --- a/source/lexer/token_type.hpp +++ b/source/lexer/token_type.hpp @@ -55,4 +55,4 @@ enum class token_type ret, }; -auto operator<<(std::ostream& ostream, const token_type& type) -> std::ostream&; +auto operator<<(std::ostream& ostream, token_type type) -> std::ostream&;