From 15d06abbc5a8752631288441131b3ebf9124f25b Mon Sep 17 00:00:00 2001 From: dec05eba Date: Wed, 9 Mar 2022 01:23:22 +0100 Subject: Fix compile on clang --- src/Body.cpp | 4 ++-- src/QuickMedia.cpp | 3 ++- src/main.cpp | 1 + 3 files changed, 5 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/Body.cpp b/src/Body.cpp index 1c436f5..dbcaab0 100644 --- a/src/Body.cpp +++ b/src/Body.cpp @@ -1484,7 +1484,7 @@ namespace QuickMedia { item_pos.y += body_spacing[body_theme].reaction_padding_y; float reaction_max_height = 0.0f; // TODO: Fix first row wrap-around - for(int i = 0; i < item->reactions.size(); ++i) { + for(int i = 0; i < (int)item->reactions.size(); ++i) { auto &reaction = item->reactions[i]; reaction.text->updateGeometry(); reaction_max_height = std::max(reaction_max_height, reaction.text->getHeight()); @@ -1704,7 +1704,7 @@ namespace QuickMedia { float reaction_offset_x = 0.0f; item_height += body_spacing[body_theme].reaction_padding_y; float reaction_max_height = 0.0f; - for(int i = 0; i < item->reactions.size(); ++i) { + for(int i = 0; i < (int)item->reactions.size(); ++i) { auto &reaction = item->reactions[i]; reaction.text->setMaxWidth(text_max_width); reaction.text->updateGeometry(); diff --git a/src/QuickMedia.cpp b/src/QuickMedia.cpp index 0da90f9..cf7d058 100644 --- a/src/QuickMedia.cpp +++ b/src/QuickMedia.cpp @@ -63,6 +63,7 @@ extern "C" { } #include #include +#include #include #include #include @@ -650,7 +651,7 @@ namespace QuickMedia { return focused_monitor_center; } - void Program::init(Window parent_window, std::string &program_path) { + void Program::init(unsigned long parent_window, std::string &program_path) { disp = XOpenDisplay(NULL); if (!disp) { show_notification("QuickMedia", "Failed to open display to X11 server", Urgency::CRITICAL); diff --git a/src/main.cpp b/src/main.cpp index 15041d5..52cb374 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,5 +1,6 @@ #include "../include/QuickMedia.hpp" #include +#include int main(int argc, char **argv) { XInitThreads(); -- cgit v1.2.3