diff --git a/source/blender/compositor/intern/COM_ChunkOrderHotspot.cc b/source/blender/compositor/intern/COM_ChunkOrderHotspot.cc index bbc98d086a6..d31ff518ecd 100644 --- a/source/blender/compositor/intern/COM_ChunkOrderHotspot.cc +++ b/source/blender/compositor/intern/COM_ChunkOrderHotspot.cc @@ -19,18 +19,11 @@ #include "COM_ChunkOrderHotspot.h" #include -ChunkOrderHotspot::ChunkOrderHotspot(int x, int y, float addition) -{ - x = x; - y = y; - addition = addition; -} - double ChunkOrderHotspot::calc_distance(int x, int y) { - int dx = x - x; - int dy = y - y; + int dx = this->x - x; + int dy = this->y - y; double result = sqrt((double)(dx * dx + dy * dy)); - result += (double)addition; + result += (double)this->addition; return result; } diff --git a/source/blender/compositor/intern/COM_ChunkOrderHotspot.h b/source/blender/compositor/intern/COM_ChunkOrderHotspot.h index af0cf897673..d7f40921836 100644 --- a/source/blender/compositor/intern/COM_ChunkOrderHotspot.h +++ b/source/blender/compositor/intern/COM_ChunkOrderHotspot.h @@ -27,8 +27,9 @@ struct ChunkOrderHotspot { int y; float addition; - public: - ChunkOrderHotspot(int x, int y, float addition); + ChunkOrderHotspot(int x, int y, float addition) : x(x), y(y), addition(addition) + { + } double calc_distance(int x, int y);