clang-tidy
This commit is contained in:
@@ -11,7 +11,7 @@ auto createPath(float start, float end, PathType type, float fixed_pos, int step
|
||||
|
||||
for (int i = 0; i < steps; ++i) {
|
||||
double t = static_cast<double>(i) / (steps - 1);
|
||||
double value = start + (end - start) * easing_function(t);
|
||||
double value = start + ((end - start) * easing_function(t));
|
||||
|
||||
if ((start > 0 && end < 0) || (start < 0 && end > 0)) {
|
||||
value = start + (end > 0 ? 1 : -1) * std::abs(end - start) * easing_function(t);
|
||||
@@ -56,7 +56,7 @@ void PathSprite::addPath(Path path, bool centered) {
|
||||
|
||||
switch (path_centered) {
|
||||
case PathCentered::ON_X: {
|
||||
const int X = path.spots.back().x - pos_.w / 2;
|
||||
const int X = path.spots.back().x - (pos_.w / 2);
|
||||
for (auto &spot : path.spots) {
|
||||
spot.x = X;
|
||||
}
|
||||
@@ -64,7 +64,7 @@ void PathSprite::addPath(Path path, bool centered) {
|
||||
break;
|
||||
}
|
||||
case PathCentered::ON_Y: {
|
||||
const int Y = path.spots.back().y - pos_.h / 2;
|
||||
const int Y = path.spots.back().y - (pos_.h / 2);
|
||||
for (auto &spot : path.spots) {
|
||||
spot.y = Y;
|
||||
}
|
||||
@@ -84,7 +84,7 @@ void PathSprite::addPath(int start, int end, PathType type, int fixed_pos, int s
|
||||
|
||||
// Añade un recorrido
|
||||
void PathSprite::addPath(const std::vector<SDL_FPoint> &spots, int waiting_counter) {
|
||||
paths_.emplace_back(std::move(spots), waiting_counter);
|
||||
paths_.emplace_back(spots, waiting_counter);
|
||||
}
|
||||
|
||||
// Habilita el objeto
|
||||
|
||||
Reference in New Issue
Block a user