Skip to content

Commit

Permalink
dont pass smol primitives by ref
Browse files Browse the repository at this point in the history
  • Loading branch information
hrzlgnm committed Nov 9, 2023
1 parent 9cf97d5 commit e8ec4d2
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion source/code/code.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include <fmt/core.h>
#include <fmt/format.h>

auto operator<<(std::ostream& ostream, const opcodes& opcode) -> std::ostream&
auto operator<<(std::ostream& ostream, opcodes opcode) -> std::ostream&
{
using enum opcodes;
switch (opcode) {
Expand Down
2 changes: 1 addition & 1 deletion source/code/code.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<size_t>;
using instructions = std::vector<uint8_t>;
Expand Down
2 changes: 1 addition & 1 deletion source/lexer/token_type.cpp
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
2 changes: 1 addition & 1 deletion source/lexer/token_type.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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&;

0 comments on commit e8ec4d2

Please sign in to comment.