mirror of https://github.com/aseprite/aseprite.git
Appease the automatons
This commit is contained in:
parent
f5ecead66f
commit
bd2ae1eb61
|
@ -42,7 +42,7 @@ std::string DitheringAlgorithmToString(DitheringAlgorithm algo)
|
|||
return (it != names.end()) ? it->second : "unknown";
|
||||
}
|
||||
|
||||
const DitheringAlgorithm DitheringAlgorithmFromString(const std::string name)
|
||||
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;
|
||||
|
|
|
@ -29,7 +29,7 @@ enum class DitheringAlgorithm {
|
|||
|
||||
bool DitheringAlgorithmIsDiffusion(DitheringAlgorithm algo);
|
||||
std::string DitheringAlgorithmToString(DitheringAlgorithm algo);
|
||||
const DitheringAlgorithm DitheringAlgorithmFromString(const std::string name);
|
||||
DitheringAlgorithm DitheringAlgorithmFromString(const std::string& name);
|
||||
|
||||
} // namespace render
|
||||
|
||||
|
|
|
@ -219,7 +219,8 @@ doc::color_t ErrorDiffusionDither::ditherRgbToIndex2D(const int x,
|
|||
const int bufferRowIndex = bufferRow * m_width;
|
||||
|
||||
for (int mx = 0; mx < matrix.width; ++mx) {
|
||||
const int coeff = direction > 0 ? matrix.coefficients[my][mx] : matrix.coefficients[my][matrix.width - 1 - mx];
|
||||
const int coeff = direction > 0 ? matrix.coefficients[my][mx] :
|
||||
matrix.coefficients[my][matrix.width - 1 - mx];
|
||||
if (coeff == 0)
|
||||
continue;
|
||||
|
||||
|
|
Loading…
Reference in New Issue