Skip to content

Commit

Permalink
Traktor: Using C++20 from now on.
Browse files Browse the repository at this point in the history
  • Loading branch information
apistol78 committed May 14, 2024
1 parent 147067b commit 10c1e7f
Show file tree
Hide file tree
Showing 12 changed files with 24 additions and 21 deletions.
4 changes: 2 additions & 2 deletions code/Avalanche/Server/App/Main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ extern "C" void __module__Traktor_Core();

#if defined(_WIN32)

TCHAR* serviceName = TEXT("Traktor Avalanche Service");
const wchar_t* serviceName = L"Traktor Avalanche Service";
SERVICE_STATUS serviceStatus;
SERVICE_STATUS_HANDLE serviceStatusHandle = 0;
std::atomic< bool > serviceRunning = true;
Expand Down Expand Up @@ -321,7 +321,7 @@ int main(int argc, const char** argv)
{
SERVICE_TABLE_ENTRY serviceTable[] =
{
{ serviceName, serviceMain },
{ (LPWSTR)serviceName, serviceMain },
{ 0, 0 }
};
StartServiceCtrlDispatcher(serviceTable);
Expand Down
2 changes: 1 addition & 1 deletion code/Core/Containers/VectorConstructor.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ struct VectorConstructorBase < ItemType, true >
};

template < typename ItemType >
struct VectorConstructor : public VectorConstructorBase< ItemType, std::is_pod< ItemType >::value >
struct VectorConstructor : public VectorConstructorBase< ItemType, std::is_trivial< ItemType >::value >
{
};

Expand Down
2 changes: 1 addition & 1 deletion code/Spark/Editor/Debug/ClientPage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ void ClientPage::eventToolBarClick(ui::ToolBarButtonClickEvent* event)
if (event->getCommand() == L"Traktor.Flash.Load")
{
ui::FileDialog fileDialog;
fileDialog.create(this, type_name(this), L"Load capture...", L"All files;*.*", false);
fileDialog.create(this, type_name(this), L"Load capture...", L"All files;*.*", L"", false);

Path fileName;
if (fileDialog.showModal(fileName) == ui::DialogResult::Ok)
Expand Down
5 changes: 4 additions & 1 deletion code/Ui/Win32/ClipboardWin32.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,10 @@ bool ClipboardWin32::setImage(const drawing::Image* image)
return false;

Ref< drawing::Image > dib = image->clone();
dib->apply(&drawing::MirrorFilter(false, true));

drawing::MirrorFilter mirrorFilter(false, true);
dib->apply(&mirrorFilter);

dib->convert(drawing::PixelFormat::getA8R8G8B8());

EmptyClipboard();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ C_FLAGS_RELEASE_EXECUTABLE=$(C_FLAGS_COMMON) -O2 -D _UNICODE -D UNICODE -D NDEBU
C_FLAG_OUTPUT=-o

CC=ccache $(TOOLCHAIN_BIN)/armv7a-linux-androideabi29-clang++
CC_FLAGS_COMMON=-std=c++17 -pthread -fPIC -D __ANDROID__
CC_FLAGS_COMMON=-std=c++20 -pthread -fPIC -D __ANDROID__
CC_FLAGS_DEBUG_SHARED=$(CC_FLAGS_COMMON) -g -D _UNICODE -D UNICODE
CC_FLAGS_RELEASE_SHARED=$(CC_FLAGS_COMMON) -O2 -D _UNICODE -D UNICODE -D NDEBUG
CC_FLAGS_DEBUG_STATIC=$(CC_FLAGS_COMMON) -g -D _UNICODE -D UNICODE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ C_FLAGS_RELEASE_EXECUTABLE=$(C_FLAGS_COMMON) -O2 -D _UNICODE -D UNICODE -D NDEBU
C_FLAG_OUTPUT=-o

CC=ccache $(TOOLCHAIN_BIN)/armv7a-linux-androideabi29-clang++
CC_FLAGS_COMMON=-std=c++17 -Wno-nullability-completeness -pthread -fPIC -D __ANDROID__
CC_FLAGS_COMMON=-std=c++20 -Wno-nullability-completeness -pthread -fPIC -D __ANDROID__
CC_FLAGS_DEBUG_SHARED=$(CC_FLAGS_COMMON) -g -D _UNICODE -D UNICODE
CC_FLAGS_RELEASE_SHARED=$(CC_FLAGS_COMMON) -O2 -D _UNICODE -D UNICODE -D NDEBUG
CC_FLAGS_DEBUG_STATIC=$(CC_FLAGS_COMMON) -g -D _UNICODE -D UNICODE
Expand Down
2 changes: 1 addition & 1 deletion resources/build/configurations/make-config-android-win.inc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ C_FLAGS_RELEASE_EXECUTABLE=$(C_FLAGS_COMMON) -O2 -D _UNICODE -D UNICODE -D NDEBU
C_FLAG_OUTPUT=-o

CC="$(TOOLCHAIN_BIN)/armv7a-linux-androideabi29-clang++"
CC_FLAGS_COMMON=-std=c++17 -Wno-nullability-completeness -pthread -fPIC -D __ANDROID__
CC_FLAGS_COMMON=-std=c++20 -Wno-nullability-completeness -pthread -fPIC -D __ANDROID__
CC_FLAGS_DEBUG_SHARED=$(CC_FLAGS_COMMON) -g -D _UNICODE -D UNICODE
CC_FLAGS_RELEASE_SHARED=$(CC_FLAGS_COMMON) -O2 -D _UNICODE -D UNICODE -D NDEBUG
CC_FLAGS_DEBUG_STATIC=$(CC_FLAGS_COMMON) -g -D _UNICODE -D UNICODE
Expand Down
2 changes: 1 addition & 1 deletion resources/build/configurations/make-config-ios.inc
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ C_FLAG_OUTPUT=-o
# C++
CC=$(TOOLCHAIN_BIN)/clang

CC_FLAGS_COMMON=-std=c++17 -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -fstrict-aliasing -fvisibility=hidden -fpascal-strings -miphoneos-version-min=$(IPHONE_OS_MIN_VERSION) -Wno-c++11-extensions
CC_FLAGS_COMMON=-std=c++20 -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -fstrict-aliasing -fvisibility=hidden -fpascal-strings -miphoneos-version-min=$(IPHONE_OS_MIN_VERSION) -Wno-c++11-extensions

CC_FLAGS_DEBUG_SHARED=$(CC_FLAGS_COMMON) -g -O0 -D_UNICODE -DUNICODE -D__IOS__ -DDEBUG=1 -DOBJC_OLD_DISPATCH_PROTOTYPES=0
CC_FLAGS_DEBUG_SHARED_armv7=-arch armv7 -isysroot $(SDK_SYSROOT) $(CC_FLAGS_DEBUG_SHARED)
Expand Down
2 changes: 1 addition & 1 deletion resources/build/configurations/make-config-linux.inc
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ C_FLAGS_RELEASE_EXECUTABLE=$(C_FLAGS_COMMON) -D NDEBUG -O3 -g1
C_FLAG_OUTPUT=-o

CC=ccache gcc
CC_FLAGS_COMMON=-fno-common -std=c++17 -march=core2 -msse4.1 -D _UNICODE -D UNICODE -D __LINUX__ -fPIC -fvisibility=hidden
CC_FLAGS_COMMON=-fno-common -std=c++20 -march=core2 -msse4.1 -D _UNICODE -D UNICODE -D __LINUX__ -fPIC -fvisibility=hidden
CC_FLAGS_DEBUG_SHARED=$(CC_FLAGS_COMMON) -D _DEBUG -O1 -g -fno-omit-frame-pointer
CC_FLAGS_RELEASE_SHARED=$(CC_FLAGS_COMMON) -D NDEBUG -O3 -g1
CC_FLAGS_DEBUG_STATIC=$(CC_FLAGS_COMMON) -D _DEBUG -O1 -g -fno-omit-frame-pointer
Expand Down
4 changes: 2 additions & 2 deletions resources/build/configurations/make-config-osx.inc
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ C_FLAGS_RELEASE_EXECUTABLE=$(C_FLAGS_COMMON) -O3 -D _UNICODE -D UNICODE
C_FLAG_OUTPUT=-o

CC=$(TOOLCHAIN_BIN)/clang++
CC_FLAGS_COMMON=-arch $(ARCH) -std=c++17 -stdlib=libc++ -mmacosx-version-min=$(MAC_OS_MIN_VERSION) -D__MAC__ -fno-strict-aliasing -fno-common -isysroot $(SDK_SYSROOT)
CC_FLAGS_COMMON=-arch $(ARCH) -std=c++20 -stdlib=libc++ -mmacosx-version-min=$(MAC_OS_MIN_VERSION) -D__MAC__ -fno-strict-aliasing -fno-common -isysroot $(SDK_SYSROOT)
CC_FLAGS_DEBUG_SHARED=$(CC_FLAGS_COMMON) -g -D _UNICODE -D UNICODE -fPIC
CC_FLAGS_RELEASE_SHARED=$(CC_FLAGS_COMMON) -O3 -D _UNICODE -D UNICODE -fPIC
CC_FLAGS_DEBUG_STATIC=$(CC_FLAGS_COMMON) -g -D _UNICODE -D UNICODE
Expand All @@ -29,7 +29,7 @@ CC_FLAGS_RELEASE_EXECUTABLE=$(CC_FLAGS_COMMON) -O3 -D _UNICODE -D UNICODE
CC_FLAG_OUTPUT=-o

MM=$(TOOLCHAIN_BIN)/clang++
MM_FLAGS_COMMON=-arch $(ARCH) -std=c++17 -stdlib=libc++ -mmacosx-version-min=$(MAC_OS_MIN_VERSION) -D__MAC__ -fobjc-arc -fno-strict-aliasing -fno-common -Wall -Wundef -Wno-ctor-dtor-privacy -isysroot $(SDK_SYSROOT)
MM_FLAGS_COMMON=-arch $(ARCH) -std=c++20 -stdlib=libc++ -mmacosx-version-min=$(MAC_OS_MIN_VERSION) -D__MAC__ -fobjc-arc -fno-strict-aliasing -fno-common -Wall -Wundef -Wno-ctor-dtor-privacy -isysroot $(SDK_SYSROOT)
MM_FLAGS_DEBUG_SHARED=$(MM_FLAGS_COMMON) -g -D _UNICODE -D UNICODE -fPIC
MM_FLAGS_RELEASE_SHARED=$(MM_FLAGS_COMMON) -O3 -D _UNICODE -D UNICODE -fPIC
MM_FLAGS_DEBUG_STATIC=$(MM_FLAGS_COMMON) -g -D _UNICODE -D UNICODE
Expand Down
2 changes: 1 addition & 1 deletion resources/build/configurations/make-config-rpi.inc
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ CC_FLAGS_COMMON=\
--target=arm-linux-gnueabihf\
--sysroot=$(SYSROOT)\
-fno-common\
-std=c++17\
-std=c++20\
-D _UNICODE\
-D UNICODE\
-D __RPI__\
Expand Down
16 changes: 8 additions & 8 deletions resources/build/configurations/msvc-2022-win64.xml
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@
</item>
<item>
<name>LanguageStandard</name>
<value>stdcpp17</value>
<value>stdcpp20</value>
</item>
</options>
</item>
Expand Down Expand Up @@ -284,7 +284,7 @@
</item>
<item>
<name>LanguageStandard</name>
<value>stdcpp17</value>
<value>stdcpp20</value>
</item>
</options>
</item>
Expand Down Expand Up @@ -390,7 +390,7 @@
</item>
<item>
<name>LanguageStandard</name>
<value>stdcpp17</value>
<value>stdcpp20</value>
</item>
</options>
</item>
Expand Down Expand Up @@ -492,7 +492,7 @@
</item>
<item>
<name>LanguageStandard</name>
<value>stdcpp17</value>
<value>stdcpp20</value>
</item>
</options>
</item>
Expand Down Expand Up @@ -624,7 +624,7 @@
</item>
<item>
<name>LanguageStandard</name>
<value>stdcpp17</value>
<value>stdcpp20</value>
</item>
</options>
</item>
Expand Down Expand Up @@ -702,7 +702,7 @@
</item>
<item>
<name>LanguageStandard</name>
<value>stdcpp17</value>
<value>stdcpp20</value>
</item>
</options>
</item>
Expand Down Expand Up @@ -832,7 +832,7 @@
</item>
<item>
<name>LanguageStandard</name>
<value>stdcpp17</value>
<value>stdcpp20</value>
</item>
</options>
</item>
Expand Down Expand Up @@ -958,7 +958,7 @@
</item>
<item>
<name>LanguageStandard</name>
<value>stdcpp17</value>
<value>stdcpp20</value>
</item>
</options>
</item>
Expand Down

0 comments on commit 10c1e7f

Please sign in to comment.