Skip to content

Commit

Permalink
Fix problem with set_logger
Browse files Browse the repository at this point in the history
  • Loading branch information
yhirose committed Sep 3, 2022
1 parent b3f4381 commit 1958bad
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions peglib.h
Original file line number Diff line number Diff line change
Expand Up @@ -4616,8 +4616,8 @@ class parser {
void set_logger(
std::function<void(size_t line, size_t col, const std::string &msg)>
log) {
log_ = [&](size_t line, size_t col, const std::string &msg,
const std::string & /*rule*/) { log(line, col, msg); };
log_ = [log](size_t line, size_t col, const std::string &msg,
const std::string & /*rule*/) { log(line, col, msg); };
}

private:
Expand Down

0 comments on commit 1958bad

Please sign in to comment.