Skip to content

Commit

Permalink
mysql_table: Use rocket::all_of()
Browse files Browse the repository at this point in the history
  • Loading branch information
lhmouse committed Jan 16, 2024
1 parent 9b03073 commit 19b29d0
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions poseidon/mysql/mysql_table.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ bool
do_is_name_valid(cow_stringR name)
{
return (name.size() != 0)
&& ::std::all_of(name.begin(), name.end(),
[](char c) {
return ((c >= '0') && (c <= '9'))
|| ((c >= 'A') && (c <= 'Z')) || ((c >= 'a') && (c <= 'z'))
|| (c == '_') || (c == '$') || (c == '-') || (c == '~');
});
&& all_of(name,
[](char c) {
return ((c >= '0') && (c <= '9'))
|| ((c >= 'A') && (c <= 'Z')) || ((c >= 'a') && (c <= 'z'))
|| (c == '_') || (c == '$') || (c == '-') || (c == '~');
});
}

template<typename elementT>
Expand Down

0 comments on commit 19b29d0

Please sign in to comment.