From a8ccf7fe8662086bb223aa4eafd0f85e717d16cf Mon Sep 17 00:00:00 2001 From: Loek Le Blansch Date: Tue, 17 Dec 2024 15:33:31 +0100 Subject: `make format` --- mwe/events/include/event.h | 2 +- src/crepe/facade/FontFacade.cpp | 12 ++++-------- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/mwe/events/include/event.h b/mwe/events/include/event.h index e1b220b..ee1bf52 100644 --- a/mwe/events/include/event.h +++ b/mwe/events/include/event.h @@ -148,7 +148,7 @@ private: }; class ShutDownEvent : public Event { public: - ShutDownEvent() : Event("ShutDownEvent"){}; + ShutDownEvent() : Event("ShutDownEvent") {}; REGISTER_EVENT_TYPE(ShutDownEvent) diff --git a/src/crepe/facade/FontFacade.cpp b/src/crepe/facade/FontFacade.cpp index d47095f..87f95ab 100644 --- a/src/crepe/facade/FontFacade.cpp +++ b/src/crepe/facade/FontFacade.cpp @@ -10,8 +10,7 @@ using namespace std; using namespace crepe; FontFacade::FontFacade() { - if (!FcInit()) - throw runtime_error("Failed to initialize Fontconfig."); + if (!FcInit()) throw runtime_error("Failed to initialize Fontconfig."); } FontFacade::~FontFacade() { FcFini(); } @@ -22,8 +21,7 @@ Asset FontFacade::get_font_asset(const string & font_family) { if (raw_pattern == NULL) throw runtime_error("Failed to create font pattern."); unique_ptr> pattern{ - raw_pattern, [](FcPattern * p) { FcPatternDestroy(p); } - }; + raw_pattern, [](FcPattern * p) { FcPatternDestroy(p); }}; FcConfig * config = FcConfigGetCurrent(); if (config == NULL) throw runtime_error("Failed to get current Fontconfig configuration."); @@ -32,9 +30,8 @@ Asset FontFacade::get_font_asset(const string & font_family) { FcPattern * raw_matched_pattern = FcFontMatch(config, pattern.get(), &result); if (raw_matched_pattern == NULL) throw runtime_error("No matching font found."); - unique_ptr> matched_pattern = { - raw_matched_pattern, [](FcPattern * p) { FcPatternDestroy(p); } - }; + unique_ptr> matched_pattern + = {raw_matched_pattern, [](FcPattern * p) { FcPatternDestroy(p); }}; FcChar8 * file_path = nullptr; FcResult res = FcPatternGetString(matched_pattern.get(), FC_FILE, 0, &file_path); @@ -44,4 +41,3 @@ Asset FontFacade::get_font_asset(const string & font_family) { string font_file_path = reinterpret_cast(file_path); return Asset(font_file_path); } - -- cgit v1.2.3