Skip to content

Commit

Permalink
Merge branch 'main' into beta
Browse files Browse the repository at this point in the history
  • Loading branch information
dacap committed Nov 6, 2024
2 parents 57c2646 + 5ec00f5 commit 1ddaf36
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 12 deletions.
21 changes: 20 additions & 1 deletion base/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,26 @@ if(WIN32)
# We only support the Unicode API
UNICODE _UNICODE)

target_compile_definitions(laf-base PRIVATE _CRT_SECURE_NO_WARNINGS)
if(MSVC)
target_compile_options(laf-base PUBLIC
# Disable warnings about possible loss of data
-wd4244

# Disable warnings about conversion from size_t to int
-wd4267

# Disable warning about using 'this' used in base member initializer list
-wd4355

# Disable function not inlined (generated by MSVC header files)
-wd4710

# Avoid warnings about usage of insecure standard C library
# functions and C++ STL functions
-D_CRT_SECURE_NO_WARNINGS
-D_SCL_SECURE_NO_WARNINGS)
endif()

target_link_libraries(laf-base dbghelp shlwapi version)
else()
if(APPLE)
Expand Down
9 changes: 0 additions & 9 deletions gfx/path_skia.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,6 @@

#include "include/core/SkPath.h"

#ifdef _MSC_VER
#pragma warning(push)
#pragma warning(disable:4244) // 'argument': conversion from 'T' to 'SkScalar', possible loss of data
#endif

namespace gfx {

// Simple wrapper for SkPath
Expand Down Expand Up @@ -119,8 +114,4 @@ namespace gfx {

} // namespace gfx

#ifdef _MSC_VER
#pragma warning(pop)
#endif

#endif
2 changes: 1 addition & 1 deletion os/skia/skia_system.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ class SkiaSystem final : public SkiaSystemBase {
}

void setTabletOptions(const TabletOptions& options) override {
#if LAF_WINDOWS
SkiaSystemBase::setTabletOptions(options);
#if LAF_WINDOWS
if (SkiaWindow* window = dynamic_cast<SkiaWindow*>(defaultWindow())) {
// TODO notify all windows
window->onTabletOptionsChange();
Expand Down
1 change: 0 additions & 1 deletion os/win/dnd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,6 @@ bool DragDataProviderWin::contains(DragDataItemType type)
UINT urlFormat = RegisterClipboardFormat(CFSTR_INETURL);
UINT pngFormat = RegisterClipboardFormat(L"PNG");
UINT fileDescriptorFormat = RegisterClipboardFormat(CFSTR_FILEDESCRIPTOR);
char name[101];
FORMATETC fmt;
while (formats->Next(1, &fmt, nullptr) == S_OK) {
switch (fmt.cfFormat) {
Expand Down

0 comments on commit 1ddaf36

Please sign in to comment.