Skip to content

Commit

Permalink
Minor cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
sasq64 committed Jun 9, 2020
1 parent 380aaef commit f73a670
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions src/assembler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,6 @@ void Assembler::setupRules()

auto it = macros.find(i->opcode);
if (it != macros.end()) {
LOGI("Found macro %s", it->second.name);
Call c{i->opcode};
if (i->mode > sixfive::ACC) {
c.args.emplace_back(any_num(i->val));
Expand Down Expand Up @@ -692,9 +691,9 @@ void Assembler::setupRules()
return sv[0];
};

parser["Index"] = [&](SV& sv) {
parser["Index"] = [&](SV& sv) -> std::any {
trace(sv);
auto index = any_cast<Number>(sv[1]);
auto index = number<size_t>(sv[1]);
std::any vec = sv[0];
if (any_cast<Number>(&vec) != nullptr) {
return any_num(0);
Expand Down
2 changes: 1 addition & 1 deletion src/wrap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ void ParserWrapper::action(
throw peg::parse_error(e.what());
} catch (assert_error& e) {
throw peg::parse_error(e.what());
} catch (std::bad_any_cast& e) {
} catch (std::bad_any_cast&) {
throw peg::parse_error("Data type error");
}
};
Expand Down

0 comments on commit f73a670

Please sign in to comment.