From ad148587dcf5244c2d2011dba339786c765c54c4 Mon Sep 17 00:00:00 2001 From: Elias Fleckenstein Date: Wed, 4 Nov 2020 16:19:54 +0100 Subject: Make Lint Happy --- src/gui/StyleSpec.h | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) (limited to 'src/gui/StyleSpec.h') diff --git a/src/gui/StyleSpec.h b/src/gui/StyleSpec.h index 67caf4f7b..aae2d46f8 100644 --- a/src/gui/StyleSpec.h +++ b/src/gui/StyleSpec.h @@ -138,10 +138,7 @@ public: } //! Gets the state that this style is intended for - State getState() const - { - return state_map; - } + State getState() const { return state_map; } //! Set the given state on this style void addState(State state) @@ -153,7 +150,8 @@ public: //! Using a list of styles mapped to state values, calculate the final // combined style for a state by propagating values in its component states - static StyleSpec getStyleFromStatePropagation(const std::array &styles, State state) + static StyleSpec getStyleFromStatePropagation( + const std::array &styles, State state) { StyleSpec temp = styles[StyleSpec::STATE_DEFAULT]; temp.state_map = state; @@ -210,7 +208,8 @@ public: return rect; } - irr::core::vector2d getVector2i(Property prop, irr::core::vector2d def) const + irr::core::vector2d getVector2i( + Property prop, irr::core::vector2d def) const { const auto &val = properties[prop]; if (val.empty()) @@ -260,10 +259,13 @@ public: int calc_size = 1; if (size[0] == '*') { - std::string new_size = size.substr(1); // Remove '*' (invalid for stof) - calc_size = stof(new_size) * g_fontengine->getFontSize(spec.mode); + std::string new_size = size.substr( + 1); // Remove '*' (invalid for stof) + calc_size = stof(new_size) * + g_fontengine->getFontSize(spec.mode); } else if (size[0] == '+' || size[0] == '-') { - calc_size = stoi(size) + g_fontengine->getFontSize(spec.mode); + calc_size = stoi(size) + + g_fontengine->getFontSize(spec.mode); } else { calc_size = stoi(size); } @@ -345,7 +347,7 @@ private: rect.LowerRightCorner = irr::core::vector2di(-x, -x); } else if (v_rect.size() == 2) { s32 x = stoi(v_rect[0]); - s32 y = stoi(v_rect[1]); + s32 y = stoi(v_rect[1]); rect.UpperLeftCorner = irr::core::vector2di(x, y); rect.LowerRightCorner = irr::core::vector2di(-x, -y); // `-x` is interpreted as `w - x` @@ -356,7 +358,7 @@ private: stoi(v_rect[2]), stoi(v_rect[3])); } else { warningstream << "Invalid rectangle string format: \"" << value - << "\"" << std::endl; + << "\"" << std::endl; return false; } @@ -365,7 +367,8 @@ private: return true; } - bool parseVector2i(const std::string &value, irr::core::vector2d *parsed_vec) const + bool parseVector2i(const std::string &value, + irr::core::vector2d *parsed_vec) const { irr::core::vector2d vec; std::vector v_vector = split(value, ','); @@ -376,12 +379,12 @@ private: vec.Y = x; } else if (v_vector.size() == 2) { s32 x = stoi(v_vector[0]); - s32 y = stoi(v_vector[1]); + s32 y = stoi(v_vector[1]); vec.X = x; vec.Y = y; } else { warningstream << "Invalid vector2d string format: \"" << value - << "\"" << std::endl; + << "\"" << std::endl; return false; } -- cgit v1.2.3