summaryrefslogtreecommitdiff
path: root/src/util.hpp
diff options
context:
space:
mode:
authorouwou <26526779+ouwou@users.noreply.github.com>2022-04-05 22:01:53 -0400
committerouwou <26526779+ouwou@users.noreply.github.com>2022-04-05 22:01:53 -0400
commit49685c39895af67d7ffcc50fdc02150b6ee44f72 (patch)
tree5c5c262f95a30e58582a285b467d05954ff5f35c /src/util.hpp
parent9767e1e7fdef9262211ec676b4f0d4c30ff10649 (diff)
downloadabaddon-portaudio-49685c39895af67d7ffcc50fdc02150b6ee44f72.tar.gz
abaddon-portaudio-49685c39895af67d7ffcc50fdc02150b6ee44f72.zip
fix up a bunch of clang-tidy stuff
mostly changing references, which i hope doesnt break stuff with models (TreeRow, iterators) since they gave me some strange problems in the past
Diffstat (limited to 'src/util.hpp')
-rw-r--r--src/util.hpp19
1 files changed, 3 insertions, 16 deletions
diff --git a/src/util.hpp b/src/util.hpp
index aa87301..4b14a7e 100644
--- a/src/util.hpp
+++ b/src/util.hpp
@@ -31,28 +31,15 @@ bool IsFile(std::string_view path);
uint64_t TimeToEpoch(int year, int month, int day, int hour, int minute, int seconds);
} // namespace util
-class Semaphore {
-public:
- Semaphore(int count = 0);
- void notify();
- void wait();
-
-private:
- std::mutex m_mutex;
- std::condition_variable m_cv;
- int m_count;
-};
-
-void LaunchBrowser(Glib::ustring url);
+void LaunchBrowser(const Glib::ustring &url);
void GetImageDimensions(int inw, int inh, int &outw, int &outh, int clampw = 400, int clamph = 300);
std::string IntToCSSColor(int color);
Gdk::RGBA IntToRGBA(int color);
-void AddWidgetMenuHandler(Gtk::Widget *widget, Gtk::Menu &menu);
-void AddWidgetMenuHandler(Gtk::Widget *widget, Gtk::Menu &menu, sigc::slot<void()> pre_callback);
+void AddWidgetMenuHandler(Gtk::Widget *widget, Gtk::Menu &menu, const sigc::slot<void()> &pre_callback);
std::vector<std::string> StringSplit(const std::string &str, const char *delim);
std::string GetExtension(std::string url);
bool IsURLViewableImage(const std::string &url);
-std::vector<uint8_t> ReadWholeFile(std::string path);
+std::vector<uint8_t> ReadWholeFile(const std::string &path);
std::string HumanReadableBytes(uint64_t bytes);
std::string FormatISO8601(const std::string &in, int extra_offset = 0, const std::string &fmt = "%x %X");
void AddPointerCursor(Gtk::Widget &widget);