Skip to content

Commit 565adea

Browse files
committed
reimplement TelegramOptions::is_data_type_supported
1 parent 0803dfb commit 565adea

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

vpr/src/server/telegramoptions.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,8 @@ std::string TelegramOptions::errors_str() const {
9898
}
9999

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

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

0 commit comments

Comments
 (0)