Skip to content

Commit

Permalink
cmake: fix clang compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
vaxerski committed Nov 28, 2024
1 parent 336b3c4 commit 4d927a5
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand Down
2 changes: 2 additions & 0 deletions src/image/formats/Bmp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ class BmpHeader {
return "Unable to parse bitmap header: wrong image size";

file.seekg(dataOffset);

return std::nullopt;
};
};

Expand Down
2 changes: 1 addition & 1 deletion src/image/formats/JpegXL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ std::expected<cairo_surface_t*, std::string> 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;
Expand Down

0 comments on commit 4d927a5

Please sign in to comment.