Apply suggestions from code review

Co-authored-by: Georgi Gerganov <ggerganov@gmail.com>
This commit is contained in:
Alexey Parfenov 2024-02-09 16:30:47 +00:00 committed by GitHub
parent 6b4f287235
commit eb45d123a3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1166,7 +1166,7 @@ std::vector<llama_sampler_type> sampler_types_from_chars(const std::string& name
std::vector<llama_sampler_type> sampler_types; std::vector<llama_sampler_type> sampler_types;
sampler_types.reserve(names_string.size()); sampler_types.reserve(names_string.size());
for(const auto& c : names_string) { for (const auto & c : names_string) {
const auto sampler_item = sampler_name_map.find(c); const auto sampler_item = sampler_name_map.find(c);
if (sampler_item != sampler_name_map.end()) { if (sampler_item != sampler_name_map.end()) {
sampler_types.push_back(sampler_item->second); sampler_types.push_back(sampler_item->second);