mirror of https://github.com/aseprite/aseprite.git
Appease the gods of const
This commit is contained in:
parent
4e5ae492e5
commit
2ba52d6d6c
|
@ -35,13 +35,13 @@ bool DitheringAlgorithmIsDiffusion(DitheringAlgorithm algo)
|
|||
}
|
||||
}
|
||||
|
||||
const std::string DitheringAlgorithmToString(DitheringAlgorithm algo)
|
||||
std::string DitheringAlgorithmToString(DitheringAlgorithm algo)
|
||||
{
|
||||
auto it = names.find(algo);
|
||||
return (it != names.end()) ? it->second : "unknown";
|
||||
}
|
||||
|
||||
const DitheringAlgorithm DitheringAlgorithmFromString(std::string name)
|
||||
const DitheringAlgorithm DitheringAlgorithmFromString(const std::string name)
|
||||
{
|
||||
auto it = std::find_if(names.begin(), names.end(), [name](const auto& pair) {
|
||||
return base::utf8_icmp(pair.second, name) == 0;
|
||||
|
|
|
@ -28,8 +28,8 @@ enum class DitheringAlgorithm {
|
|||
};
|
||||
|
||||
bool DitheringAlgorithmIsDiffusion(DitheringAlgorithm algo);
|
||||
const std::string DitheringAlgorithmToString(DitheringAlgorithm algo);
|
||||
const DitheringAlgorithm DitheringAlgorithmFromString(std::string name);
|
||||
std::string DitheringAlgorithmToString(DitheringAlgorithm algo);
|
||||
const DitheringAlgorithm DitheringAlgorithmFromString(const std::string name);
|
||||
|
||||
} // namespace render
|
||||
|
||||
|
|
Loading…
Reference in New Issue