From f05af9d4922ab0ace26f7ef07b88710d4b9c4b03 Mon Sep 17 00:00:00 2001 From: Windy Darian Date: Wed, 10 Apr 2019 23:45:26 -0400 Subject: [PATCH 1/2] fix vhacd namespace placing in thirdparty/vhacd/src/btConvexHullComputer.cpp --- thirdparty/vhacd/src/btConvexHullComputer.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/thirdparty/vhacd/src/btConvexHullComputer.cpp b/thirdparty/vhacd/src/btConvexHullComputer.cpp index 5ff3ab917e7..15956fc0c40 100644 --- a/thirdparty/vhacd/src/btConvexHullComputer.cpp +++ b/thirdparty/vhacd/src/btConvexHullComputer.cpp @@ -3,8 +3,8 @@ Copyright (c) 2011 Ole Kniemeyer, MAXON, www.maxon.net This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. @@ -21,11 +21,6 @@ subject to the following restrictions: #ifdef __GNUC__ #include - -//GODOT ADDITION -namespace VHACD { -// - #elif defined(_MSC_VER) typedef __int32 int32_t; typedef __int64 int64_t; @@ -54,6 +49,10 @@ typedef unsigned long long int32_t uint64_t; #include #endif +//GODOT ADDITION +namespace VHACD { +// + // Convex hull implementation based on Preparata and Hong // Ole Kniemeyer, MAXON Computer GmbH class btConvexHullInternal { From 6c90aaf5c741fd7d9ff7b47e5bb4ed7d45623c2e Mon Sep 17 00:00:00 2001 From: Windy Darian Date: Thu, 11 Apr 2019 00:05:11 -0400 Subject: [PATCH 2/2] Use c++11 for vhacd because VHACD-ASYNC.cpp wants it --- modules/vhacd/SCsub | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/vhacd/SCsub b/modules/vhacd/SCsub index e89a64a68e4..11cd5f47439 100644 --- a/modules/vhacd/SCsub +++ b/modules/vhacd/SCsub @@ -27,6 +27,10 @@ thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources] env_vhacd.Append(CPPPATH=[thirdparty_dir+"/inc"]) env_vhacd.Append(CPPFLAGS=["-DGODOT_ENET"]) +# upstream uses c++11 +if not env.msvc: + env_vhacd.Append(CCFLAGS="-std=c++11") + env_thirdparty = env_vhacd.Clone() env_thirdparty.disable_warnings() env_thirdparty.add_source_files(env.modules_sources, thirdparty_sources)