small cleanup

This commit is contained in:
Corentin Le Molgat
2024-09-25 07:56:21 +02:00
parent c709e98327
commit 3568fa161f
2 changed files with 2 additions and 2 deletions

View File

@@ -254,7 +254,7 @@ const T& TopN<T, Cmp>::peek_bottom() {
return elements_.front();
}
template <class T, class Cmp>
std::vector<T> TopN<T, Cmp>::Take() {
std::vector<T> TopN<T, Cmp>::Take() {
std::vector<T> out = std::move(elements_);
if (state_ != State::HEAP_SORTED) {
std::sort(out.begin(), out.end(), cmp_);

View File

@@ -58,7 +58,7 @@ std::string ProtoEnumToString(ProtoEnumType enum_value) {
"Invalid enum value of: ", enum_value, " for enum type: ",
google::protobuf::GetEnumDescriptor<ProtoEnumType>()->name());
}
return enum_value_descriptor->name();
return std::string(enum_value_descriptor->name());
#endif // !defined(__PORTABLE_PLATFORM__)
}