mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-02 11:59:58 +00:00
Prefer passing arguments by value instead of by reference when possible
Accessing values should be faster than accessing reference/pointers.
This commit is contained in:
parent
c4fefadf79
commit
b3ecf6985f
@ -235,7 +235,7 @@ void OctreeMap::feedWithImage(const Image* image,
|
||||
const bool imageIsRGBA = image->pixelFormat() == IMAGE_RGB;
|
||||
|
||||
auto add_color_to_octree =
|
||||
[this, &forceFullOpacity, &levelDeep, &imageIsRGBA](color_t color) {
|
||||
[this, &forceFullOpacity, levelDeep, imageIsRGBA](color_t color) {
|
||||
const int alpha = (imageIsRGBA ? rgba_geta(color) : graya_geta(color));
|
||||
if (alpha >= MIN_ALPHA_THRESHOLD) { // Colors which alpha is less than
|
||||
// MIN_ALPHA_THRESHOLD will not registered
|
||||
|
Loading…
Reference in New Issue
Block a user