diff --git a/CMakeLists.txt b/CMakeLists.txt index 2483c9f..80944d7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -30,6 +30,10 @@ else() message(STATUS "Configuring hyprgraphics in Release") endif() +if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang") + add_compile_definitions(__cpp_concepts=202002L) +endif() + file(GLOB_RECURSE SRCFILES CONFIGURE_DEPENDS "src/*.cpp" "include/*.hpp") file(GLOB_RECURSE PUBLIC_HEADERS CONFIGURE_DEPENDS "include/*.hpp") diff --git a/src/image/formats/Bmp.cpp b/src/image/formats/Bmp.cpp index 78994c4..ccc6804 100644 --- a/src/image/formats/Bmp.cpp +++ b/src/image/formats/Bmp.cpp @@ -64,6 +64,8 @@ class BmpHeader { return "Unable to parse bitmap header: wrong image size"; file.seekg(dataOffset); + + return std::nullopt; }; }; diff --git a/src/image/formats/JpegXL.cpp b/src/image/formats/JpegXL.cpp index 2740516..49ffc99 100644 --- a/src/image/formats/JpegXL.cpp +++ b/src/image/formats/JpegXL.cpp @@ -50,7 +50,7 @@ std::expected JXL::createSurfaceFromJXL(const std .num_channels = 4, .data_type = JXL_TYPE_UINT8, .endianness = JXL_LITTLE_ENDIAN, - .align = cairo_image_surface_get_stride(cairoSurface), + .align = (size_t)cairo_image_surface_get_stride(cairoSurface), }; const auto OUTPUTSIZE = basicInfo.xsize * basicInfo.ysize * format.num_channels;