Skip to content

Commit

Permalink
reimplement TelegramOptions::is_data_type_supported
Browse files Browse the repository at this point in the history
  • Loading branch information
w0lek committed May 21, 2024
1 parent 0803dfb commit 565adea
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions vpr/src/server/telegramoptions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@ std::string TelegramOptions::errors_str() const {
}

bool TelegramOptions::is_data_type_supported(const std::string& type) const {
static const std::set<std::string> supported_types{"int", "string", "bool"};
return supported_types.count(type) != 0;
constexpr std::array<std::string_view, 3> supported_types{"int", "string", "bool"};
return std::find(supported_types.begin(), supported_types.end(), type) != supported_types.end();
}

bool TelegramOptions::check_keys_presence(const std::vector<std::string>& keys) {
Expand Down

0 comments on commit 565adea

Please sign in to comment.