Skip to content

Commit

Permalink
made count method const and removed superfluous ;
Browse files Browse the repository at this point in the history
  • Loading branch information
gittiver committed Oct 9, 2024
1 parent f84ad04 commit 25ca2f5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/crow/json.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ namespace crow // NOTE: Already documented in "crow/app.h"
if (c < 10)
return '0' + c;
return 'a' + c - 10;
};
}

inline void escape(const std::string& str, std::string& ret)
{
Expand Down Expand Up @@ -573,7 +573,7 @@ namespace crow // NOTE: Already documented in "crow/app.h"
return it != end() && it->key_ == str;
}

int count(const std::string& str)
int count(const std::string& str) const
{
return has(str) ? 1 : 0;
}
Expand Down

0 comments on commit 25ca2f5

Please sign in to comment.