Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions cli/source/subcommands/docs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,7 @@ namespace pl::cli::sub {
std::string getTypeEndian(const core::ast::ASTNodeTypeApplication *typeApp) {
auto endian = typeApp->getEndian();

if (!endian.has_value())
return "";
else if (endian == std::endian::little)
if (endian == std::endian::little)
return "le ";
else if (endian == std::endian::big)
return "be ";
Expand Down Expand Up @@ -144,7 +142,7 @@ namespace pl::cli::sub {
auto ast = runtime.parseString(patternFile.readString(), wolv::util::toUTF8String(patternFile.getPath()));
if (!ast.has_value()) {
auto compileErrors = runtime.getCompileErrors();
if (compileErrors.size()>0) {
if (!compileErrors.empty()) {
fmt::print("Compilation failed\n");
for (const auto &error : compileErrors) {
fmt::print("{}\n", error.format());
Expand Down
2 changes: 1 addition & 1 deletion lib/source/pl/core/ast/ast_node_match_statement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
namespace pl::core::ast {

ASTNodeMatchStatement::ASTNodeMatchStatement(std::vector<MatchCase> cases, std::optional<MatchCase> defaultCase)
: ASTNode(), m_cases(std::move(cases)), m_defaultCase(std::move(defaultCase)) { }
: m_cases(std::move(cases)), m_defaultCase(std::move(defaultCase)) { }

ASTNodeMatchStatement::ASTNodeMatchStatement(const ASTNodeMatchStatement &other) : ASTNode(other) {
for (auto &matchCase : other.m_cases)
Expand Down
Loading