From 903c00d05186502abebc4eaca83896548eaa4d02 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Mon, 10 Feb 2025 12:57:49 -0500 Subject: Fully parenthesize expressions --- src/Canvas.cpp | 4 ++-- src/TextViewLog.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Canvas.cpp b/src/Canvas.cpp index 80b5993..ae8c51d 100644 --- a/src/Canvas.cpp +++ b/src/Canvas.cpp @@ -146,8 +146,8 @@ Canvas::create_port(Configuration& conf, Coord loc; if (!conf.get_module_location(client_name, module_type, loc)) { // No position saved, come up with a pseudo-random one - loc.x = static_cast(20 + _rng() % 640); - loc.y = static_cast(20 + _rng() % 480); + loc.x = static_cast(20 + (_rng() % 640)); + loc.y = static_cast(20 + (_rng() % 480)); conf.set_module_location(client_name, module_type, loc); } diff --git a/src/TextViewLog.cpp b/src/TextViewLog.cpp index ba7c512..ad20c37 100644 --- a/src/TextViewLog.cpp +++ b/src/TextViewLog.cpp @@ -76,7 +76,7 @@ TextViewLog::min_height() const int line_height = 0; _text_view->get_line_yrange(buffer->begin(), y, line_height); - return line_height + 2 * _text_view->get_pixels_inside_wrap(); + return line_height + (2 * _text_view->get_pixels_inside_wrap()); } } // namespace patchage -- cgit v1.2.1