This commit is contained in:
Chuck Walbourn 2023-04-27 17:03:53 -07:00 коммит произвёл GitHub
Родитель c1e6b25eab
Коммит ebdfb10964
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
4 изменённых файлов: 19 добавлений и 13 удалений

Просмотреть файл

@ -5,6 +5,10 @@ cmake_minimum_required (VERSION 3.20)
set(UVATLAS_VERSION 1.8.4)
if(DEFINED XBOX_CONSOLE_TARGET)
set(CMAKE_TRY_COMPILE_TARGET_TYPE "STATIC_LIBRARY")
endif()
project (UVAtlas
VERSION ${UVATLAS_VERSION}
DESCRIPTION "UVAtlas Isochart Atlas Library"
@ -184,7 +188,11 @@ if(DEFINED XBOX_CONSOLE_TARGET)
message(FATAL_ERROR "Microsoft GDK with Xbox Extensions environment needs to be set for Xbox One.")
endif()
target_compile_definitions(${PROJECT_NAME} PUBLIC _GAMING_XBOX _GAMING_XBOX_XBOXONE)
else()
message(FATAL_ERROR "Unknown XBOX_CONSOLE_TARGET")
endif()
elseif(WINDOWS_STORE)
target_compile_definitions(${PROJECT_NAME} PUBLIC WINAPI_FAMILY=WINAPI_FAMILY_APP)
endif()
#--- Package
@ -302,6 +310,9 @@ endif()
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
set(WarningsLib -Wall -Wpedantic -Wextra)
if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 16.0)
list(APPEND WarningsLib "-Wno-unsafe-buffer-usage")
endif()
target_compile_options(${PROJECT_NAME} PRIVATE ${WarningsLib})
set(WarningsEXE ${WarningsLib} "-Wno-c++98-compat" "-Wno-c++98-compat-pedantic" "-Wno-switch" "-Wno-switch-enum" "-Wno-exit-time-destructors" "-Wno-switch" "-Wno-switch-enum" "-Wno-language-extension-token" "-Wno-missing-prototypes")
@ -379,10 +390,6 @@ elseif(CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
endif()
if(WIN32)
if(WINDOWS_STORE)
target_compile_definitions(${PROJECT_NAME} PRIVATE WINAPI_FAMILY=WINAPI_FAMILY_APP)
endif()
if(WINDOWS_STORE OR (${DIRECTX_ARCH} MATCHES "^arm64") OR (DEFINED XBOX_CONSOLE_TARGET))
set(WINVER 0x0A00)
elseif(${DIRECTX_ARCH} MATCHES "^arm")

Просмотреть файл

@ -85,3 +85,5 @@ This project has adopted the [Microsoft Open Source Code of Conduct](https://ope
## Trademarks
This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow [Microsoft's Trademark & Brand Guidelines](https://www.microsoft.com/en-us/legal/intellectualproperty/trademarks/usage/general). Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party's policies.
Thanks to Andrew Farrier and Scott Matloff for their on-going help with code reviews.

Просмотреть файл

@ -131,10 +131,6 @@ namespace GeodesicDist
{
memset(this, 0, sizeof(EdgeWindow));
}
EdgeWindow(const EdgeWindow& R)
{
memcpy(this, &R, sizeof(EdgeWindow));
}
// trick constructor
EdgeWindow(const uint32_t R)
{
@ -142,6 +138,9 @@ namespace GeodesicDist
memset(this, 0, sizeof(EdgeWindow));
}
EdgeWindow(const EdgeWindow&) = default;
EdgeWindow& operator=(const EdgeWindow&) = default;
#ifdef _PREFAST_
#pragma warning(pop)
#endif

Просмотреть файл

@ -26,11 +26,9 @@ namespace Internal
m_data = R;
}
ReverseComparison& operator=(const ReverseComparison& R)
{
m_data = R.m_data;
return *this;
}
ReverseComparison(const ReverseComparison&) = default;
ReverseComparison& operator=(const ReverseComparison&) = default;
bool operator>(const ReverseComparison& R)
{
return m_data < R.m_data;