Clean up rtgui perspective.* and controllines.*

Change size_t to std::size_t, remove void from function parameters, use
constants to represent the minimum required number of control lines, and
change const auto & to const auto.
This commit is contained in:
Lawrence Lee
2021-05-31 11:20:01 -07:00
parent 2c1e6a8ca1
commit e7e6dd1cb5
4 changed files with 22 additions and 23 deletions

View File

@@ -52,7 +52,7 @@ protected:
bool draw_mode;
bool drawing_line;
bool edited;
size_t horizontalCount, verticalCount;
std::size_t horizontalCount, verticalCount;
Cairo::RefPtr<RTSurface> line_icon_h, line_icon_v;
Cairo::RefPtr<RTSurface> line_icon_h_prelight, line_icon_v_prelight;
int prev_obj;
@@ -68,7 +68,7 @@ protected:
* line, inclusive, the line type is set to vertical. Otherwise, horizontal.
*/
void autoSetLineType(int object_id);
void removeLine(size_t line_id);
void removeLine(std::size_t line_id);
public:
class Callbacks
@@ -89,9 +89,9 @@ public:
bool getEdited(void) const;
/** Returns the number of horizontal control lines. */
size_t getHorizontalCount(void) const;
std::size_t getHorizontalCount() const;
/** Returns the number of vertical control lines. */
size_t getVerticalCount(void) const;
std::size_t getVerticalCount() const;
void removeAll(void);
/** Sets whether or not the lines are visible and interact-able. */
void setActive(bool active);
@@ -101,7 +101,7 @@ public:
void setEditProvider(EditDataProvider* provider);
void setLines(const std::vector<rtengine::ControlLine>& lines);
/** Returns the number of lines. */
size_t size(void) const;
std::size_t size() const;
/**
* Allocates a new array and populates it with copies of the control lines.
*/