4 #include "../../include/nicehash-api.hpp" 14 void NiceHashApi::throwExceptionIfAlgorithmInvalid (
int algorithm_id) {
17 const std::set<int> valid_algorithm_ids = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
18 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
21 const bool algorithm_id_is_valid = valid_algorithm_ids.count(algorithm_id);
23 if (!algorithm_id_is_valid)
24 throw std::invalid_argument(
"Algorithm ID is invalid");