From 13a50ed965f268bac3ebbb05c7fe2e39d2e51c8a Mon Sep 17 00:00:00 2001 From: WageCrusader <86795536+WageCrusader@users.noreply.github.com> Date: Tue, 6 Feb 2024 18:16:58 -0600 Subject: [PATCH 1/3] builds + runs on macOS --- .gitignore | 1 + engine/lib/libogg/include/ogg/config_types.h | 2 +- engine/lib/zlib/gzguts.h | 4 + engine/source/math/mMathSSE.cc | 2 +- engine/source/platformOSX/main.mm | 4 + .../source/platformOSX/osxCocoaUtilities.mm | 2 +- engine/source/platformOSX/osxInput.mm | 1 + engine/source/platformOSX/osxThread.mm | 1 + .../googleTest/fused-src/gtest/gtest.h | 138 +++++++++--------- .../googleTest/include/gtest/gtest-message.h | 2 +- .../googleTest/include/gtest/gtest-printers.h | 42 +++--- .../include/gtest/internal/gtest-internal.h | 6 +- .../internal/gtest-param-util-generated.h | 74 +++++----- .../gtest-param-util-generated.h.pump | 10 +- .../include/gtest/internal/gtest-port.h | 6 +- .../include/gtest/internal/gtest-tuple.h | 10 +- .../include/gtest/internal/gtest-tuple.h.pump | 10 +- .../googleTest/samples/sample8_unittest.cc | 8 +- .../googleTest/test/gtest-param-test_test.cc | 6 +- .../googleTest/test/gtest-printers_test.cc | 4 +- .../googleTest/test/gtest-tuple_test.cc | 10 +- tools/CMake/basics.cmake | 7 +- tools/CMake/torque2d.cmake | 26 +++- 23 files changed, 200 insertions(+), 176 deletions(-) diff --git a/.gitignore b/.gitignore index a9b8efce1..67d6a21a8 100755 --- a/.gitignore +++ b/.gitignore @@ -90,3 +90,4 @@ engine/compilers/Make-32bit/Debug/ engine/compilers/Make-32bit/Release/ engine/compilers/Make-64bit/Debug/ engine/compilers/Make-64bit/Release/ +*build*/ \ No newline at end of file diff --git a/engine/lib/libogg/include/ogg/config_types.h b/engine/lib/libogg/include/ogg/config_types.h index 71fbb0fa0..7da9e8edf 100644 --- a/engine/lib/libogg/include/ogg/config_types.h +++ b/engine/lib/libogg/include/ogg/config_types.h @@ -5,4 +5,4 @@ typedef unsigned short ogg_uint16_t; typedef int ogg_int32_t; typedef unsigned int ogg_uint32_t; typedef long long ogg_int64_t; -#endif \ No newline at end of file +#endif diff --git a/engine/lib/zlib/gzguts.h b/engine/lib/zlib/gzguts.h index 990a4d251..0352ee843 100644 --- a/engine/lib/zlib/gzguts.h +++ b/engine/lib/zlib/gzguts.h @@ -43,6 +43,10 @@ # define WIDECHAR #endif +#if defined(__APPLE__) +# include +#endif + #ifdef WINAPI_FAMILY # define open _open # define read _read diff --git a/engine/source/math/mMathSSE.cc b/engine/source/math/mMathSSE.cc index 9584f10e0..7819123dd 100755 --- a/engine/source/math/mMathSSE.cc +++ b/engine/source/math/mMathSSE.cc @@ -202,7 +202,7 @@ extern "C" void SSE_MatrixF_x_MatrixF_Aligned(const F32 *matA, const F32 *matB, F32 *result); } -#elif defined( TORQUE_COMPILER_GCC ) && (defined( TORQUE_CPU_X86 ) || defined( TORQUE_CPU_X64 ) && !defined(TORQUE_OS_IOS)) +#elif defined( TORQUE_COMPILER_GCC ) && (defined( TORQUE_CPU_X86 ) || defined( TORQUE_CPU_X64 ) && !defined(TORQUE_CPU_ARM)) #define ADD_SSE_FN void SSE_MatrixF_x_MatrixF(const F32 *matA, const F32 *matB, F32 *result) diff --git a/engine/source/platformOSX/main.mm b/engine/source/platformOSX/main.mm index 7de821c95..ca233645f 100755 --- a/engine/source/platformOSX/main.mm +++ b/engine/source/platformOSX/main.mm @@ -19,8 +19,12 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS // IN THE SOFTWARE. //----------------------------------------------------------------------------- +#import +#import "AppDelegate.h" int main(int argc, char *argv[]) { + [NSApplication sharedApplication]; + [NSApp setDelegate: [AppDelegate new]]; return NSApplicationMain(argc, (const char **)argv); } diff --git a/engine/source/platformOSX/osxCocoaUtilities.mm b/engine/source/platformOSX/osxCocoaUtilities.mm index b508a4c00..1091c2f75 100755 --- a/engine/source/platformOSX/osxCocoaUtilities.mm +++ b/engine/source/platformOSX/osxCocoaUtilities.mm @@ -20,7 +20,7 @@ // IN THE SOFTWARE. //----------------------------------------------------------------------------- #import "platformOSX/platformOSX.h" -#import "fileDialog.h" +#import "platform/nativeDialogs/fileDialog.h" #import "osxCocoaUtilities.h" @implementation NSSavePanel (TorqueFileDialogs) diff --git a/engine/source/platformOSX/osxInput.mm b/engine/source/platformOSX/osxInput.mm index 6c420c103..c09648cc2 100755 --- a/engine/source/platformOSX/osxInput.mm +++ b/engine/source/platformOSX/osxInput.mm @@ -21,6 +21,7 @@ //----------------------------------------------------------------------------- #import "platform/platform.h" #import "platform/platformInput.h" +#import "platformOSX/platformOSX.h" #import "platformOSX/osxInputManager.h" #import "platform/event.h" diff --git a/engine/source/platformOSX/osxThread.mm b/engine/source/platformOSX/osxThread.mm index fd3f88676..3be3b70ae 100755 --- a/engine/source/platformOSX/osxThread.mm +++ b/engine/source/platformOSX/osxThread.mm @@ -27,6 +27,7 @@ #import "platform/threads/thread.h" #import "platform/platformSemaphore.h" #import "platform/threads/mutex.h" +#import "platformOSX/platformOSX.h" #import "console/console.h" //----------------------------------------------------------------------------- diff --git a/engine/source/testing/googleTest/fused-src/gtest/gtest.h b/engine/source/testing/googleTest/fused-src/gtest/gtest.h index 3143bd679..7a4ec6f41 100755 --- a/engine/source/testing/googleTest/fused-src/gtest/gtest.h +++ b/engine/source/testing/googleTest/fused-src/gtest/gtest.h @@ -154,7 +154,7 @@ // GTEST_HAS_STD_WSTRING - Define it to 1/0 to indicate that // std::wstring does/doesn't work (Google Test can // be used where std::wstring is unavailable). -// GTEST_HAS_TR1_TUPLE - Define it to 1/0 to indicate tr1::tuple +// GTEST_HAS_TR1_TUPLE - Define it to 1/0 to indicate tuple // is/isn't available. // GTEST_HAS_SEH - Define it to 1/0 to indicate whether the // compiler supports Microsoft's "Structured @@ -680,17 +680,17 @@ template struct ByRef { typedef T& type; }; // NOLINT // A handy wrapper for ByRef. -#define GTEST_BY_REF_(T) typename ::std::tr1::gtest_internal::ByRef::type +#define GTEST_BY_REF_(T) typename ::std::gtest_internal::ByRef::type // AddRef::type is T if T is a reference; otherwise it's T&. This -// is the same as tr1::add_reference::type. +// is the same as add_reference::type. template struct AddRef { typedef T& type; }; // NOLINT template struct AddRef { typedef T& type; }; // NOLINT // A handy wrapper for AddRef. -#define GTEST_ADD_REF_(T) typename ::std::tr1::gtest_internal::AddRef::type +#define GTEST_ADD_REF_(T) typename ::std::gtest_internal::AddRef::type // A helper for implementing get(). template class Get; @@ -1200,7 +1200,7 @@ class tuple { // 6.1.3.2 Tuple creation functions. // Known limitations: we don't support passing an -// std::tr1::reference_wrapper to make_tuple(). And we don't +// std::reference_wrapper to make_tuple(). And we don't // implement tie(). inline tuple<> make_tuple() { return tuple<>(); } @@ -1473,7 +1473,7 @@ struct SameSizeTuplePrefixComparator { template static bool Eq(const Tuple1& t1, const Tuple2& t2) { return SameSizeTuplePrefixComparator::Eq(t1, t2) && - ::std::tr1::get(t1) == ::std::tr1::get(t2); + ::std::get(t1) == ::std::get(t2); } }; @@ -2516,7 +2516,7 @@ GTEST_API_ size_t GetThreadCount(); // The Nokia Symbian and IBM XL C/C++ compilers cannot decide between // const T& and const T* in a function template. These compilers // _can_ decide between class template specializations for T and T*, -// so a tr1::type_traits-like is_pointer works. +// so a type_traits-like is_pointer works. #if defined(__SYMBIAN32__) || defined(__IBMCPP__) # define GTEST_NEEDS_IS_POINTER_ 1 #endif @@ -7455,7 +7455,7 @@ struct CompileAssertTypesEqual { // Removes the reference from a type if it is a reference type, // otherwise leaves it unchanged. This is the same as -// tr1::remove_reference, which is not widely available yet. +// remove_reference, which is not widely available yet. template struct RemoveReference { typedef T type; }; // NOLINT template @@ -7467,7 +7467,7 @@ struct RemoveReference { typedef T type; }; // NOLINT typename ::testing::internal::RemoveReference::type // Removes const from a type if it is a const type, otherwise leaves -// it unchanged. This is the same as tr1::remove_const, which is not +// it unchanged. This is the same as remove_const, which is not // widely available yet. template struct RemoveConst { typedef T type; }; // NOLINT @@ -7497,7 +7497,7 @@ struct RemoveConst { // Adds reference to a type if it is not a reference type, // otherwise leaves it unchanged. This is the same as -// tr1::add_reference, which is not widely available yet. +// add_reference, which is not widely available yet. template struct AddReference { typedef T& type; }; // NOLINT template @@ -8690,7 +8690,7 @@ class GTEST_API_ Message { // These are needed as the Nokia Symbian Compiler cannot decide between // const T& and const T* in a function template. The Nokia compiler _can_ // decide between class template specializations for T and T*, so a - // tr1::type_traits-like is_pointer works, and we can overload on that. + // type_traits-like is_pointer works, and we can overload on that. template inline void StreamHelper(internal::true_type /*dummy*/, T* pointer) { if (pointer == NULL) { @@ -9666,7 +9666,7 @@ inline void PrintTo(const ::std::wstring& s, ::std::ostream* os) { #endif // GTEST_HAS_STD_WSTRING #if GTEST_HAS_TR1_TUPLE -// Overload for ::std::tr1::tuple. Needed for printing function arguments, +// Overload for ::std::tuple. Needed for printing function arguments, // which are packed as tuples. // Helper function for printing a tuple. T must be instantiated with @@ -9676,63 +9676,63 @@ void PrintTupleTo(const T& t, ::std::ostream* os); // Overloaded PrintTo() for tuples of various arities. We support // tuples of up-to 10 fields. The following implementation works -// regardless of whether tr1::tuple is implemented using the +// regardless of whether tuple is implemented using the // non-standard variadic template feature or not. -inline void PrintTo(const ::std::tr1::tuple<>& t, ::std::ostream* os) { +inline void PrintTo(const ::std::tuple<>& t, ::std::ostream* os) { PrintTupleTo(t, os); } template -void PrintTo(const ::std::tr1::tuple& t, ::std::ostream* os) { +void PrintTo(const ::std::tuple& t, ::std::ostream* os) { PrintTupleTo(t, os); } template -void PrintTo(const ::std::tr1::tuple& t, ::std::ostream* os) { +void PrintTo(const ::std::tuple& t, ::std::ostream* os) { PrintTupleTo(t, os); } template -void PrintTo(const ::std::tr1::tuple& t, ::std::ostream* os) { +void PrintTo(const ::std::tuple& t, ::std::ostream* os) { PrintTupleTo(t, os); } template -void PrintTo(const ::std::tr1::tuple& t, ::std::ostream* os) { +void PrintTo(const ::std::tuple& t, ::std::ostream* os) { PrintTupleTo(t, os); } template -void PrintTo(const ::std::tr1::tuple& t, +void PrintTo(const ::std::tuple& t, ::std::ostream* os) { PrintTupleTo(t, os); } template -void PrintTo(const ::std::tr1::tuple& t, +void PrintTo(const ::std::tuple& t, ::std::ostream* os) { PrintTupleTo(t, os); } template -void PrintTo(const ::std::tr1::tuple& t, +void PrintTo(const ::std::tuple& t, ::std::ostream* os) { PrintTupleTo(t, os); } template -void PrintTo(const ::std::tr1::tuple& t, +void PrintTo(const ::std::tuple& t, ::std::ostream* os) { PrintTupleTo(t, os); } template -void PrintTo(const ::std::tr1::tuple& t, +void PrintTo(const ::std::tuple& t, ::std::ostream* os) { PrintTupleTo(t, os); } @@ -9740,7 +9740,7 @@ void PrintTo(const ::std::tr1::tuple& t, template void PrintTo( - const ::std::tr1::tuple& t, + const ::std::tuple& t, ::std::ostream* os) { PrintTupleTo(t, os); } @@ -9900,8 +9900,8 @@ struct TuplePrefixPrinter { static void PrintPrefixTo(const Tuple& t, ::std::ostream* os) { TuplePrefixPrinter::PrintPrefixTo(t, os); *os << ", "; - UniversalPrinter::type> - ::Print(::std::tr1::get(t), os); + UniversalPrinter::type> + ::Print(::std::get(t), os); } // Tersely prints the first N fields of a tuple to a string vector, @@ -9910,7 +9910,7 @@ struct TuplePrefixPrinter { static void TersePrintPrefixToStrings(const Tuple& t, Strings* strings) { TuplePrefixPrinter::TersePrintPrefixToStrings(t, strings); ::std::stringstream ss; - UniversalTersePrint(::std::tr1::get(t), &ss); + UniversalTersePrint(::std::get(t), &ss); strings->push_back(ss.str()); } }; @@ -9933,14 +9933,14 @@ template <> struct TuplePrefixPrinter<1> { template static void PrintPrefixTo(const Tuple& t, ::std::ostream* os) { - UniversalPrinter::type>:: - Print(::std::tr1::get<0>(t), os); + UniversalPrinter::type>:: + Print(::std::get<0>(t), os); } template static void TersePrintPrefixToStrings(const Tuple& t, Strings* strings) { ::std::stringstream ss; - UniversalTersePrint(::std::tr1::get<0>(t), &ss); + UniversalTersePrint(::std::get<0>(t), &ss); strings->push_back(ss.str()); } }; @@ -9950,7 +9950,7 @@ struct TuplePrefixPrinter<1> { template void PrintTupleTo(const T& t, ::std::ostream* os) { *os << "("; - TuplePrefixPrinter< ::std::tr1::tuple_size::value>:: + TuplePrefixPrinter< ::std::tuple_size::value>:: PrintPrefixTo(t, os); *os << ")"; } @@ -9961,7 +9961,7 @@ void PrintTupleTo(const T& t, ::std::ostream* os) { template Strings UniversalTersePrintTupleFieldsToStrings(const Tuple& value) { Strings result; - TuplePrefixPrinter< ::std::tr1::tuple_size::value>:: + TuplePrefixPrinter< ::std::tuple_size::value>:: TersePrintPrefixToStrings(value, &result); return result; } @@ -10593,7 +10593,7 @@ class ParameterizedTestCaseRegistry { // and at most 10 arguments in Combine. Please contact // googletestframework@googlegroups.com if you need more. // Please note that the number of arguments to Combine is limited -// by the maximum arity of the implementation of tr1::tuple which is +// by the maximum arity of the implementation of tuple which is // currently set at 10. #ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PARAM_UTIL_GENERATED_H_ @@ -13387,9 +13387,9 @@ class ValueArray50 { // template class CartesianProductGenerator2 - : public ParamGeneratorInterface< ::std::tr1::tuple > { + : public ParamGeneratorInterface< ::std::tuple > { public: - typedef ::std::tr1::tuple ParamType; + typedef ::std::tuple ParamType; CartesianProductGenerator2(const ParamGenerator& g1, const ParamGenerator& g2) @@ -13502,9 +13502,9 @@ class CartesianProductGenerator2 template class CartesianProductGenerator3 - : public ParamGeneratorInterface< ::std::tr1::tuple > { + : public ParamGeneratorInterface< ::std::tuple > { public: - typedef ::std::tr1::tuple ParamType; + typedef ::std::tuple ParamType; CartesianProductGenerator3(const ParamGenerator& g1, const ParamGenerator& g2, const ParamGenerator& g3) @@ -13634,9 +13634,9 @@ class CartesianProductGenerator3 template class CartesianProductGenerator4 - : public ParamGeneratorInterface< ::std::tr1::tuple > { + : public ParamGeneratorInterface< ::std::tuple > { public: - typedef ::std::tr1::tuple ParamType; + typedef ::std::tuple ParamType; CartesianProductGenerator4(const ParamGenerator& g1, const ParamGenerator& g2, const ParamGenerator& g3, @@ -13785,9 +13785,9 @@ class CartesianProductGenerator4 template class CartesianProductGenerator5 - : public ParamGeneratorInterface< ::std::tr1::tuple > { + : public ParamGeneratorInterface< ::std::tuple > { public: - typedef ::std::tr1::tuple ParamType; + typedef ::std::tuple ParamType; CartesianProductGenerator5(const ParamGenerator& g1, const ParamGenerator& g2, const ParamGenerator& g3, @@ -13953,10 +13953,10 @@ class CartesianProductGenerator5 template class CartesianProductGenerator6 - : public ParamGeneratorInterface< ::std::tr1::tuple > { public: - typedef ::std::tr1::tuple ParamType; + typedef ::std::tuple ParamType; CartesianProductGenerator6(const ParamGenerator& g1, const ParamGenerator& g2, const ParamGenerator& g3, @@ -14139,10 +14139,10 @@ class CartesianProductGenerator6 template class CartesianProductGenerator7 - : public ParamGeneratorInterface< ::std::tr1::tuple > { public: - typedef ::std::tr1::tuple ParamType; + typedef ::std::tuple ParamType; CartesianProductGenerator7(const ParamGenerator& g1, const ParamGenerator& g2, const ParamGenerator& g3, @@ -14342,10 +14342,10 @@ class CartesianProductGenerator7 template class CartesianProductGenerator8 - : public ParamGeneratorInterface< ::std::tr1::tuple > { public: - typedef ::std::tr1::tuple ParamType; + typedef ::std::tuple ParamType; CartesianProductGenerator8(const ParamGenerator& g1, const ParamGenerator& g2, const ParamGenerator& g3, @@ -14564,10 +14564,10 @@ class CartesianProductGenerator8 template class CartesianProductGenerator9 - : public ParamGeneratorInterface< ::std::tr1::tuple > { public: - typedef ::std::tr1::tuple ParamType; + typedef ::std::tuple ParamType; CartesianProductGenerator9(const ParamGenerator& g1, const ParamGenerator& g2, const ParamGenerator& g3, @@ -14803,10 +14803,10 @@ class CartesianProductGenerator9 template class CartesianProductGenerator10 - : public ParamGeneratorInterface< ::std::tr1::tuple > { public: - typedef ::std::tr1::tuple ParamType; + typedef ::std::tuple ParamType; CartesianProductGenerator10(const ParamGenerator& g1, const ParamGenerator& g2, const ParamGenerator& g3, @@ -15068,8 +15068,8 @@ class CartesianProductHolder2 { CartesianProductHolder2(const Generator1& g1, const Generator2& g2) : g1_(g1), g2_(g2) {} template - operator ParamGenerator< ::std::tr1::tuple >() const { - return ParamGenerator< ::std::tr1::tuple >( + operator ParamGenerator< ::std::tuple >() const { + return ParamGenerator< ::std::tuple >( new CartesianProductGenerator2( static_cast >(g1_), static_cast >(g2_))); @@ -15090,8 +15090,8 @@ CartesianProductHolder3(const Generator1& g1, const Generator2& g2, const Generator3& g3) : g1_(g1), g2_(g2), g3_(g3) {} template - operator ParamGenerator< ::std::tr1::tuple >() const { - return ParamGenerator< ::std::tr1::tuple >( + operator ParamGenerator< ::std::tuple >() const { + return ParamGenerator< ::std::tuple >( new CartesianProductGenerator3( static_cast >(g1_), static_cast >(g2_), @@ -15115,8 +15115,8 @@ CartesianProductHolder4(const Generator1& g1, const Generator2& g2, const Generator3& g3, const Generator4& g4) : g1_(g1), g2_(g2), g3_(g3), g4_(g4) {} template - operator ParamGenerator< ::std::tr1::tuple >() const { - return ParamGenerator< ::std::tr1::tuple >( + operator ParamGenerator< ::std::tuple >() const { + return ParamGenerator< ::std::tuple >( new CartesianProductGenerator4( static_cast >(g1_), static_cast >(g2_), @@ -15142,8 +15142,8 @@ CartesianProductHolder5(const Generator1& g1, const Generator2& g2, const Generator3& g3, const Generator4& g4, const Generator5& g5) : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5) {} template - operator ParamGenerator< ::std::tr1::tuple >() const { - return ParamGenerator< ::std::tr1::tuple >( + operator ParamGenerator< ::std::tuple >() const { + return ParamGenerator< ::std::tuple >( new CartesianProductGenerator5( static_cast >(g1_), static_cast >(g2_), @@ -15173,8 +15173,8 @@ CartesianProductHolder6(const Generator1& g1, const Generator2& g2, : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5), g6_(g6) {} template - operator ParamGenerator< ::std::tr1::tuple >() const { - return ParamGenerator< ::std::tr1::tuple >( + operator ParamGenerator< ::std::tuple >() const { + return ParamGenerator< ::std::tuple >( new CartesianProductGenerator6( static_cast >(g1_), static_cast >(g2_), @@ -15206,9 +15206,9 @@ CartesianProductHolder7(const Generator1& g1, const Generator2& g2, : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5), g6_(g6), g7_(g7) {} template - operator ParamGenerator< ::std::tr1::tuple >() const { - return ParamGenerator< ::std::tr1::tuple >( + return ParamGenerator< ::std::tuple >( new CartesianProductGenerator7( static_cast >(g1_), static_cast >(g2_), @@ -15244,9 +15244,9 @@ CartesianProductHolder8(const Generator1& g1, const Generator2& g2, g8_(g8) {} template - operator ParamGenerator< ::std::tr1::tuple >() const { - return ParamGenerator< ::std::tr1::tuple >( + return ParamGenerator< ::std::tuple >( new CartesianProductGenerator8( static_cast >(g1_), static_cast >(g2_), @@ -15285,9 +15285,9 @@ CartesianProductHolder9(const Generator1& g1, const Generator2& g2, g9_(g9) {} template - operator ParamGenerator< ::std::tr1::tuple >() const { - return ParamGenerator< ::std::tr1::tuple >( new CartesianProductGenerator9( static_cast >(g1_), @@ -15329,9 +15329,9 @@ CartesianProductHolder10(const Generator1& g1, const Generator2& g2, g9_(g9), g10_(g10) {} template - operator ParamGenerator< ::std::tr1::tuple >() const { - return ParamGenerator< ::std::tr1::tuple >( new CartesianProductGenerator10( diff --git a/engine/source/testing/googleTest/include/gtest/gtest-message.h b/engine/source/testing/googleTest/include/gtest/gtest-message.h index 9b7142f32..a64abef11 100755 --- a/engine/source/testing/googleTest/include/gtest/gtest-message.h +++ b/engine/source/testing/googleTest/include/gtest/gtest-message.h @@ -197,7 +197,7 @@ class GTEST_API_ Message { // These are needed as the Nokia Symbian Compiler cannot decide between // const T& and const T* in a function template. The Nokia compiler _can_ // decide between class template specializations for T and T*, so a - // tr1::type_traits-like is_pointer works, and we can overload on that. + // type_traits-like is_pointer works, and we can overload on that. template inline void StreamHelper(internal::true_type /*dummy*/, T* pointer) { if (pointer == NULL) { diff --git a/engine/source/testing/googleTest/include/gtest/gtest-printers.h b/engine/source/testing/googleTest/include/gtest/gtest-printers.h index 9cbab3ff4..3927962ff 100755 --- a/engine/source/testing/googleTest/include/gtest/gtest-printers.h +++ b/engine/source/testing/googleTest/include/gtest/gtest-printers.h @@ -481,7 +481,7 @@ inline void PrintTo(const ::std::wstring& s, ::std::ostream* os) { #endif // GTEST_HAS_STD_WSTRING #if GTEST_HAS_TR1_TUPLE -// Overload for ::std::tr1::tuple. Needed for printing function arguments, +// Overload for ::std::tuple. Needed for printing function arguments, // which are packed as tuples. // Helper function for printing a tuple. T must be instantiated with @@ -491,63 +491,63 @@ void PrintTupleTo(const T& t, ::std::ostream* os); // Overloaded PrintTo() for tuples of various arities. We support // tuples of up-to 10 fields. The following implementation works -// regardless of whether tr1::tuple is implemented using the +// regardless of whether tuple is implemented using the // non-standard variadic template feature or not. -inline void PrintTo(const ::std::tr1::tuple<>& t, ::std::ostream* os) { +inline void PrintTo(const ::std::tuple<>& t, ::std::ostream* os) { PrintTupleTo(t, os); } template -void PrintTo(const ::std::tr1::tuple& t, ::std::ostream* os) { +void PrintTo(const ::std::tuple& t, ::std::ostream* os) { PrintTupleTo(t, os); } template -void PrintTo(const ::std::tr1::tuple& t, ::std::ostream* os) { +void PrintTo(const ::std::tuple& t, ::std::ostream* os) { PrintTupleTo(t, os); } template -void PrintTo(const ::std::tr1::tuple& t, ::std::ostream* os) { +void PrintTo(const ::std::tuple& t, ::std::ostream* os) { PrintTupleTo(t, os); } template -void PrintTo(const ::std::tr1::tuple& t, ::std::ostream* os) { +void PrintTo(const ::std::tuple& t, ::std::ostream* os) { PrintTupleTo(t, os); } template -void PrintTo(const ::std::tr1::tuple& t, +void PrintTo(const ::std::tuple& t, ::std::ostream* os) { PrintTupleTo(t, os); } template -void PrintTo(const ::std::tr1::tuple& t, +void PrintTo(const ::std::tuple& t, ::std::ostream* os) { PrintTupleTo(t, os); } template -void PrintTo(const ::std::tr1::tuple& t, +void PrintTo(const ::std::tuple& t, ::std::ostream* os) { PrintTupleTo(t, os); } template -void PrintTo(const ::std::tr1::tuple& t, +void PrintTo(const ::std::tuple& t, ::std::ostream* os) { PrintTupleTo(t, os); } template -void PrintTo(const ::std::tr1::tuple& t, +void PrintTo(const ::std::tuple& t, ::std::ostream* os) { PrintTupleTo(t, os); } @@ -555,7 +555,7 @@ void PrintTo(const ::std::tr1::tuple& t, template void PrintTo( - const ::std::tr1::tuple& t, + const ::std::tuple& t, ::std::ostream* os) { PrintTupleTo(t, os); } @@ -715,8 +715,8 @@ struct TuplePrefixPrinter { static void PrintPrefixTo(const Tuple& t, ::std::ostream* os) { TuplePrefixPrinter::PrintPrefixTo(t, os); *os << ", "; - UniversalPrinter::type> - ::Print(::std::tr1::get(t), os); + UniversalPrinter::type> + ::Print(::std::get(t), os); } // Tersely prints the first N fields of a tuple to a string vector, @@ -725,7 +725,7 @@ struct TuplePrefixPrinter { static void TersePrintPrefixToStrings(const Tuple& t, Strings* strings) { TuplePrefixPrinter::TersePrintPrefixToStrings(t, strings); ::std::stringstream ss; - UniversalTersePrint(::std::tr1::get(t), &ss); + UniversalTersePrint(::std::get(t), &ss); strings->push_back(ss.str()); } }; @@ -748,14 +748,14 @@ template <> struct TuplePrefixPrinter<1> { template static void PrintPrefixTo(const Tuple& t, ::std::ostream* os) { - UniversalPrinter::type>:: - Print(::std::tr1::get<0>(t), os); + UniversalPrinter::type>:: + Print(::std::get<0>(t), os); } template static void TersePrintPrefixToStrings(const Tuple& t, Strings* strings) { ::std::stringstream ss; - UniversalTersePrint(::std::tr1::get<0>(t), &ss); + UniversalTersePrint(::std::get<0>(t), &ss); strings->push_back(ss.str()); } }; @@ -765,7 +765,7 @@ struct TuplePrefixPrinter<1> { template void PrintTupleTo(const T& t, ::std::ostream* os) { *os << "("; - TuplePrefixPrinter< ::std::tr1::tuple_size::value>:: + TuplePrefixPrinter< ::std::tuple_size::value>:: PrintPrefixTo(t, os); *os << ")"; } @@ -776,7 +776,7 @@ void PrintTupleTo(const T& t, ::std::ostream* os) { template Strings UniversalTersePrintTupleFieldsToStrings(const Tuple& value) { Strings result; - TuplePrefixPrinter< ::std::tr1::tuple_size::value>:: + TuplePrefixPrinter< ::std::tuple_size::value>:: TersePrintPrefixToStrings(value, &result); return result; } diff --git a/engine/source/testing/googleTest/include/gtest/internal/gtest-internal.h b/engine/source/testing/googleTest/include/gtest/internal/gtest-internal.h index 7aa1197f1..3c32b2af7 100755 --- a/engine/source/testing/googleTest/include/gtest/internal/gtest-internal.h +++ b/engine/source/testing/googleTest/include/gtest/internal/gtest-internal.h @@ -775,7 +775,7 @@ struct CompileAssertTypesEqual { // Removes the reference from a type if it is a reference type, // otherwise leaves it unchanged. This is the same as -// tr1::remove_reference, which is not widely available yet. +// remove_reference, which is not widely available yet. template struct RemoveReference { typedef T type; }; // NOLINT template @@ -787,7 +787,7 @@ struct RemoveReference { typedef T type; }; // NOLINT typename ::testing::internal::RemoveReference::type // Removes const from a type if it is a const type, otherwise leaves -// it unchanged. This is the same as tr1::remove_const, which is not +// it unchanged. This is the same as remove_const, which is not // widely available yet. template struct RemoveConst { typedef T type; }; // NOLINT @@ -817,7 +817,7 @@ struct RemoveConst { // Adds reference to a type if it is not a reference type, // otherwise leaves it unchanged. This is the same as -// tr1::add_reference, which is not widely available yet. +// add_reference, which is not widely available yet. template struct AddReference { typedef T& type; }; // NOLINT template diff --git a/engine/source/testing/googleTest/include/gtest/internal/gtest-param-util-generated.h b/engine/source/testing/googleTest/include/gtest/internal/gtest-param-util-generated.h index 258267500..7e0667fad 100755 --- a/engine/source/testing/googleTest/include/gtest/internal/gtest-param-util-generated.h +++ b/engine/source/testing/googleTest/include/gtest/internal/gtest-param-util-generated.h @@ -40,7 +40,7 @@ // and at most 10 arguments in Combine. Please contact // googletestframework@googlegroups.com if you need more. // Please note that the number of arguments to Combine is limited -// by the maximum arity of the implementation of tr1::tuple which is +// by the maximum arity of the implementation of tuple which is // currently set at 10. #ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PARAM_UTIL_GENERATED_H_ @@ -2836,9 +2836,9 @@ class ValueArray50 { // template class CartesianProductGenerator2 - : public ParamGeneratorInterface< ::std::tr1::tuple > { + : public ParamGeneratorInterface< ::std::tuple > { public: - typedef ::std::tr1::tuple ParamType; + typedef ::std::tuple ParamType; CartesianProductGenerator2(const ParamGenerator& g1, const ParamGenerator& g2) @@ -2951,9 +2951,9 @@ class CartesianProductGenerator2 template class CartesianProductGenerator3 - : public ParamGeneratorInterface< ::std::tr1::tuple > { + : public ParamGeneratorInterface< ::std::tuple > { public: - typedef ::std::tr1::tuple ParamType; + typedef ::std::tuple ParamType; CartesianProductGenerator3(const ParamGenerator& g1, const ParamGenerator& g2, const ParamGenerator& g3) @@ -3083,9 +3083,9 @@ class CartesianProductGenerator3 template class CartesianProductGenerator4 - : public ParamGeneratorInterface< ::std::tr1::tuple > { + : public ParamGeneratorInterface< ::std::tuple > { public: - typedef ::std::tr1::tuple ParamType; + typedef ::std::tuple ParamType; CartesianProductGenerator4(const ParamGenerator& g1, const ParamGenerator& g2, const ParamGenerator& g3, @@ -3234,9 +3234,9 @@ class CartesianProductGenerator4 template class CartesianProductGenerator5 - : public ParamGeneratorInterface< ::std::tr1::tuple > { + : public ParamGeneratorInterface< ::std::tuple > { public: - typedef ::std::tr1::tuple ParamType; + typedef ::std::tuple ParamType; CartesianProductGenerator5(const ParamGenerator& g1, const ParamGenerator& g2, const ParamGenerator& g3, @@ -3402,10 +3402,10 @@ class CartesianProductGenerator5 template class CartesianProductGenerator6 - : public ParamGeneratorInterface< ::std::tr1::tuple > { public: - typedef ::std::tr1::tuple ParamType; + typedef ::std::tuple ParamType; CartesianProductGenerator6(const ParamGenerator& g1, const ParamGenerator& g2, const ParamGenerator& g3, @@ -3588,10 +3588,10 @@ class CartesianProductGenerator6 template class CartesianProductGenerator7 - : public ParamGeneratorInterface< ::std::tr1::tuple > { public: - typedef ::std::tr1::tuple ParamType; + typedef ::std::tuple ParamType; CartesianProductGenerator7(const ParamGenerator& g1, const ParamGenerator& g2, const ParamGenerator& g3, @@ -3791,10 +3791,10 @@ class CartesianProductGenerator7 template class CartesianProductGenerator8 - : public ParamGeneratorInterface< ::std::tr1::tuple > { public: - typedef ::std::tr1::tuple ParamType; + typedef ::std::tuple ParamType; CartesianProductGenerator8(const ParamGenerator& g1, const ParamGenerator& g2, const ParamGenerator& g3, @@ -4013,10 +4013,10 @@ class CartesianProductGenerator8 template class CartesianProductGenerator9 - : public ParamGeneratorInterface< ::std::tr1::tuple > { public: - typedef ::std::tr1::tuple ParamType; + typedef ::std::tuple ParamType; CartesianProductGenerator9(const ParamGenerator& g1, const ParamGenerator& g2, const ParamGenerator& g3, @@ -4252,10 +4252,10 @@ class CartesianProductGenerator9 template class CartesianProductGenerator10 - : public ParamGeneratorInterface< ::std::tr1::tuple > { public: - typedef ::std::tr1::tuple ParamType; + typedef ::std::tuple ParamType; CartesianProductGenerator10(const ParamGenerator& g1, const ParamGenerator& g2, const ParamGenerator& g3, @@ -4517,8 +4517,8 @@ class CartesianProductHolder2 { CartesianProductHolder2(const Generator1& g1, const Generator2& g2) : g1_(g1), g2_(g2) {} template - operator ParamGenerator< ::std::tr1::tuple >() const { - return ParamGenerator< ::std::tr1::tuple >( + operator ParamGenerator< ::std::tuple >() const { + return ParamGenerator< ::std::tuple >( new CartesianProductGenerator2( static_cast >(g1_), static_cast >(g2_))); @@ -4539,8 +4539,8 @@ CartesianProductHolder3(const Generator1& g1, const Generator2& g2, const Generator3& g3) : g1_(g1), g2_(g2), g3_(g3) {} template - operator ParamGenerator< ::std::tr1::tuple >() const { - return ParamGenerator< ::std::tr1::tuple >( + operator ParamGenerator< ::std::tuple >() const { + return ParamGenerator< ::std::tuple >( new CartesianProductGenerator3( static_cast >(g1_), static_cast >(g2_), @@ -4564,8 +4564,8 @@ CartesianProductHolder4(const Generator1& g1, const Generator2& g2, const Generator3& g3, const Generator4& g4) : g1_(g1), g2_(g2), g3_(g3), g4_(g4) {} template - operator ParamGenerator< ::std::tr1::tuple >() const { - return ParamGenerator< ::std::tr1::tuple >( + operator ParamGenerator< ::std::tuple >() const { + return ParamGenerator< ::std::tuple >( new CartesianProductGenerator4( static_cast >(g1_), static_cast >(g2_), @@ -4591,8 +4591,8 @@ CartesianProductHolder5(const Generator1& g1, const Generator2& g2, const Generator3& g3, const Generator4& g4, const Generator5& g5) : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5) {} template - operator ParamGenerator< ::std::tr1::tuple >() const { - return ParamGenerator< ::std::tr1::tuple >( + operator ParamGenerator< ::std::tuple >() const { + return ParamGenerator< ::std::tuple >( new CartesianProductGenerator5( static_cast >(g1_), static_cast >(g2_), @@ -4622,8 +4622,8 @@ CartesianProductHolder6(const Generator1& g1, const Generator2& g2, : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5), g6_(g6) {} template - operator ParamGenerator< ::std::tr1::tuple >() const { - return ParamGenerator< ::std::tr1::tuple >( + operator ParamGenerator< ::std::tuple >() const { + return ParamGenerator< ::std::tuple >( new CartesianProductGenerator6( static_cast >(g1_), static_cast >(g2_), @@ -4655,9 +4655,9 @@ CartesianProductHolder7(const Generator1& g1, const Generator2& g2, : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5), g6_(g6), g7_(g7) {} template - operator ParamGenerator< ::std::tr1::tuple >() const { - return ParamGenerator< ::std::tr1::tuple >( + return ParamGenerator< ::std::tuple >( new CartesianProductGenerator7( static_cast >(g1_), static_cast >(g2_), @@ -4693,9 +4693,9 @@ CartesianProductHolder8(const Generator1& g1, const Generator2& g2, g8_(g8) {} template - operator ParamGenerator< ::std::tr1::tuple >() const { - return ParamGenerator< ::std::tr1::tuple >( + return ParamGenerator< ::std::tuple >( new CartesianProductGenerator8( static_cast >(g1_), static_cast >(g2_), @@ -4734,9 +4734,9 @@ CartesianProductHolder9(const Generator1& g1, const Generator2& g2, g9_(g9) {} template - operator ParamGenerator< ::std::tr1::tuple >() const { - return ParamGenerator< ::std::tr1::tuple >( new CartesianProductGenerator9( static_cast >(g1_), @@ -4778,9 +4778,9 @@ CartesianProductHolder10(const Generator1& g1, const Generator2& g2, g9_(g9), g10_(g10) {} template - operator ParamGenerator< ::std::tr1::tuple >() const { - return ParamGenerator< ::std::tr1::tuple >( new CartesianProductGenerator10( diff --git a/engine/source/testing/googleTest/include/gtest/internal/gtest-param-util-generated.h.pump b/engine/source/testing/googleTest/include/gtest/internal/gtest-param-util-generated.h.pump index dbe938630..93506d642 100755 --- a/engine/source/testing/googleTest/include/gtest/internal/gtest-param-util-generated.h.pump +++ b/engine/source/testing/googleTest/include/gtest/internal/gtest-param-util-generated.h.pump @@ -39,7 +39,7 @@ $var maxtuple = 10 $$ Maximum number of Combine arguments we want to support. // and at most $maxtuple arguments in Combine. Please contact // googletestframework@googlegroups.com if you need more. // Please note that the number of arguments to Combine is limited -// by the maximum arity of the implementation of tr1::tuple which is +// by the maximum arity of the implementation of tuple which is // currently set at $maxtuple. #ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PARAM_UTIL_GENERATED_H_ @@ -128,9 +128,9 @@ $range k 2..i template <$for j, [[typename T$j]]> class CartesianProductGenerator$i - : public ParamGeneratorInterface< ::std::tr1::tuple<$for j, [[T$j]]> > { + : public ParamGeneratorInterface< ::std::tuple<$for j, [[T$j]]> > { public: - typedef ::std::tr1::tuple<$for j, [[T$j]]> ParamType; + typedef ::std::tuple<$for j, [[T$j]]> ParamType; CartesianProductGenerator$i($for j, [[const ParamGenerator& g$j]]) : $for j, [[g$(j)_(g$j)]] {} @@ -269,8 +269,8 @@ class CartesianProductHolder$i { CartesianProductHolder$i($for j, [[const Generator$j& g$j]]) : $for j, [[g$(j)_(g$j)]] {} template <$for j, [[typename T$j]]> - operator ParamGenerator< ::std::tr1::tuple<$for j, [[T$j]]> >() const { - return ParamGenerator< ::std::tr1::tuple<$for j, [[T$j]]> >( + operator ParamGenerator< ::std::tuple<$for j, [[T$j]]> >() const { + return ParamGenerator< ::std::tuple<$for j, [[T$j]]> >( new CartesianProductGenerator$i<$for j, [[T$j]]>( $for j,[[ diff --git a/engine/source/testing/googleTest/include/gtest/internal/gtest-port.h b/engine/source/testing/googleTest/include/gtest/internal/gtest-port.h index 157b47f86..b2408f3f8 100755 --- a/engine/source/testing/googleTest/include/gtest/internal/gtest-port.h +++ b/engine/source/testing/googleTest/include/gtest/internal/gtest-port.h @@ -59,7 +59,7 @@ // GTEST_HAS_STD_WSTRING - Define it to 1/0 to indicate that // std::wstring does/doesn't work (Google Test can // be used where std::wstring is unavailable). -// GTEST_HAS_TR1_TUPLE - Define it to 1/0 to indicate tr1::tuple +// GTEST_HAS_TR1_TUPLE - Define it to 1/0 to indicate tuple // is/isn't available. // GTEST_HAS_SEH - Define it to 1/0 to indicate whether the // compiler supports Microsoft's "Structured @@ -496,7 +496,7 @@ # undef _TR1_FUNCTIONAL // Allows the user to #include // if he chooses to. # else -# include // NOLINT +# include // NOLINT # endif // !GTEST_HAS_RTTI && GTEST_GCC_VER_ < 40302 # else @@ -1454,7 +1454,7 @@ GTEST_API_ size_t GetThreadCount(); // The Nokia Symbian and IBM XL C/C++ compilers cannot decide between // const T& and const T* in a function template. These compilers // _can_ decide between class template specializations for T and T*, -// so a tr1::type_traits-like is_pointer works. +// so a type_traits-like is_pointer works. #if defined(__SYMBIAN32__) || defined(__IBMCPP__) # define GTEST_NEEDS_IS_POINTER_ 1 #endif diff --git a/engine/source/testing/googleTest/include/gtest/internal/gtest-tuple.h b/engine/source/testing/googleTest/include/gtest/internal/gtest-tuple.h index d1af50e18..fca1c7215 100755 --- a/engine/source/testing/googleTest/include/gtest/internal/gtest-tuple.h +++ b/engine/source/testing/googleTest/include/gtest/internal/gtest-tuple.h @@ -119,17 +119,17 @@ template struct ByRef { typedef T& type; }; // NOLINT // A handy wrapper for ByRef. -#define GTEST_BY_REF_(T) typename ::std::tr1::gtest_internal::ByRef::type +#define GTEST_BY_REF_(T) typename ::std::gtest_internal::ByRef::type // AddRef::type is T if T is a reference; otherwise it's T&. This -// is the same as tr1::add_reference::type. +// is the same as add_reference::type. template struct AddRef { typedef T& type; }; // NOLINT template struct AddRef { typedef T& type; }; // NOLINT // A handy wrapper for AddRef. -#define GTEST_ADD_REF_(T) typename ::std::tr1::gtest_internal::AddRef::type +#define GTEST_ADD_REF_(T) typename ::std::gtest_internal::AddRef::type // A helper for implementing get(). template class Get; @@ -639,7 +639,7 @@ class tuple { // 6.1.3.2 Tuple creation functions. // Known limitations: we don't support passing an -// std::tr1::reference_wrapper to make_tuple(). And we don't +// std::reference_wrapper to make_tuple(). And we don't // implement tie(). inline tuple<> make_tuple() { return tuple<>(); } @@ -912,7 +912,7 @@ struct SameSizeTuplePrefixComparator { template static bool Eq(const Tuple1& t1, const Tuple2& t2) { return SameSizeTuplePrefixComparator::Eq(t1, t2) && - ::std::tr1::get(t1) == ::std::tr1::get(t2); + ::std::get(t1) == ::std::get(t2); } }; diff --git a/engine/source/testing/googleTest/include/gtest/internal/gtest-tuple.h.pump b/engine/source/testing/googleTest/include/gtest/internal/gtest-tuple.h.pump index ef519094a..783a81f69 100755 --- a/engine/source/testing/googleTest/include/gtest/internal/gtest-tuple.h.pump +++ b/engine/source/testing/googleTest/include/gtest/internal/gtest-tuple.h.pump @@ -95,17 +95,17 @@ template struct ByRef { typedef T& type; }; // NOLINT // A handy wrapper for ByRef. -#define GTEST_BY_REF_(T) typename ::std::tr1::gtest_internal::ByRef::type +#define GTEST_BY_REF_(T) typename ::std::gtest_internal::ByRef::type // AddRef::type is T if T is a reference; otherwise it's T&. This -// is the same as tr1::add_reference::type. +// is the same as add_reference::type. template struct AddRef { typedef T& type; }; // NOLINT template struct AddRef { typedef T& type; }; // NOLINT // A handy wrapper for AddRef. -#define GTEST_ADD_REF_(T) typename ::std::tr1::gtest_internal::AddRef::type +#define GTEST_ADD_REF_(T) typename ::std::gtest_internal::AddRef::type // A helper for implementing get(). template class Get; @@ -198,7 +198,7 @@ $for m [[ // 6.1.3.2 Tuple creation functions. // Known limitations: we don't support passing an -// std::tr1::reference_wrapper to make_tuple(). And we don't +// std::reference_wrapper to make_tuple(). And we don't // implement tie(). inline tuple<> make_tuple() { return tuple<>(); } @@ -292,7 +292,7 @@ struct SameSizeTuplePrefixComparator { template static bool Eq(const Tuple1& t1, const Tuple2& t2) { return SameSizeTuplePrefixComparator::Eq(t1, t2) && - ::std::tr1::get(t1) == ::std::tr1::get(t2); + ::std::get(t1) == ::std::get(t2); } }; diff --git a/engine/source/testing/googleTest/samples/sample8_unittest.cc b/engine/source/testing/googleTest/samples/sample8_unittest.cc index 5ad2e2c9f..fa82d3d69 100755 --- a/engine/source/testing/googleTest/samples/sample8_unittest.cc +++ b/engine/source/testing/googleTest/samples/sample8_unittest.cc @@ -90,7 +90,7 @@ using ::testing::Combine; // PreCalculatedPrimeTable disabled. We do this by defining fixture which will // accept different combinations of parameters for instantiating a // HybridPrimeTable instance. -class PrimeTableTest : public TestWithParam< ::std::tr1::tuple > { +class PrimeTableTest : public TestWithParam< ::std::tuple > { protected: virtual void SetUp() { // This can be written as @@ -99,10 +99,10 @@ class PrimeTableTest : public TestWithParam< ::std::tr1::tuple > { // int max_precalculated; // tie(force_on_the_fly, max_precalculated) = GetParam(); // - // once the Google C++ Style Guide allows use of ::std::tr1::tie. + // once the Google C++ Style Guide allows use of ::std::tie. // - bool force_on_the_fly = ::std::tr1::get<0>(GetParam()); - int max_precalculated = ::std::tr1::get<1>(GetParam()); + bool force_on_the_fly = ::std::get<0>(GetParam()); + int max_precalculated = ::std::get<1>(GetParam()); table_ = new HybridPrimeTable(force_on_the_fly, max_precalculated); } virtual void TearDown() { diff --git a/engine/source/testing/googleTest/test/gtest-param-test_test.cc b/engine/source/testing/googleTest/test/gtest-param-test_test.cc index 94a53d9f2..22e6328c6 100755 --- a/engine/source/testing/googleTest/test/gtest-param-test_test.cc +++ b/engine/source/testing/googleTest/test/gtest-param-test_test.cc @@ -64,9 +64,9 @@ using ::testing::ValuesIn; # if GTEST_HAS_COMBINE using ::testing::Combine; -using ::std::tr1::get; -using ::std::tr1::make_tuple; -using ::std::tr1::tuple; +using ::std::get; +using ::std::make_tuple; +using ::std::tuple; # endif // GTEST_HAS_COMBINE using ::testing::internal::ParamGenerator; diff --git a/engine/source/testing/googleTest/test/gtest-printers_test.cc b/engine/source/testing/googleTest/test/gtest-printers_test.cc index 6292c7f23..58c88d14d 100755 --- a/engine/source/testing/googleTest/test/gtest-printers_test.cc +++ b/engine/source/testing/googleTest/test/gtest-printers_test.cc @@ -208,8 +208,8 @@ using ::testing::internal::kReference; using ::testing::internal::string; #if GTEST_HAS_TR1_TUPLE -using ::std::tr1::make_tuple; -using ::std::tr1::tuple; +using ::std::make_tuple; +using ::std::tuple; #endif #if _MSC_VER diff --git a/engine/source/testing/googleTest/test/gtest-tuple_test.cc b/engine/source/testing/googleTest/test/gtest-tuple_test.cc index bfaa3e0ac..0e1f6f3a3 100755 --- a/engine/source/testing/googleTest/test/gtest-tuple_test.cc +++ b/engine/source/testing/googleTest/test/gtest-tuple_test.cc @@ -35,11 +35,11 @@ namespace { -using ::std::tr1::get; -using ::std::tr1::make_tuple; -using ::std::tr1::tuple; -using ::std::tr1::tuple_element; -using ::std::tr1::tuple_size; +using ::std::get; +using ::std::make_tuple; +using ::std::tuple; +using ::std::tuple_element; +using ::std::tuple_size; using ::testing::StaticAssertTypeEq; // Tests that tuple_element >::type returns TK. diff --git a/tools/CMake/basics.cmake b/tools/CMake/basics.cmake index 0e31519b6..8845c5ed7 100644 --- a/tools/CMake/basics.cmake +++ b/tools/CMake/basics.cmake @@ -1,4 +1,7 @@ -if(CMAKE_CXX_SIZEOF_DATA_PTR EQUAL 8 ) + +if(CMAKE_SYSTEM_PROCESSOR STREQUAL "arm64" OR "aarch64") + set( TORQUE_CPU_ARM64 ON) +elseif(CMAKE_CXX_SIZEOF_DATA_PTR EQUAL 8 ) set( TORQUE_CPU_X64 ON) elseif( CMAKE_CXX_SIZEOF_DATA_PTR EQUAL 4 ) set (TORQUE_CPU_X32 ON) @@ -317,7 +320,7 @@ macro(finishExecutable) endif() if (APPLE) - set(ICON_FILE "${projectSrcDir}/torque.icns") + #set(ICON_FILE "${projectSrcDir}/torque.icns") set_source_files_properties(${ICON_FILE} PROPERTIES MACOSX_PACKAGE_LOCATION "Resources") add_executable("${PROJECT_NAME}" MACOSX_BUNDLE ${ICON_FILE} ${${PROJECT_NAME}_files}) else() diff --git a/tools/CMake/torque2d.cmake b/tools/CMake/torque2d.cmake index cb7e771d7..b3f2d40d9 100644 --- a/tools/CMake/torque2d.cmake +++ b/tools/CMake/torque2d.cmake @@ -5,16 +5,26 @@ if(UNIX) set(CXX_FLAG32 "") endif() #set(CXX_FLAG32 "-m32") #uncomment for build x32 on OSx64 - - if (CMAKE_CXX_COMPILER_ID MATCHES "Clang") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CXX_FLAG32} -Wundef -msse -pipe -Wfatal-errors -Wno-return-type-c-linkage -Wno-unused-local-typedef ${TORQUE_ADDITIONAL_LINKER_FLAGS}") - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${CXX_FLAG32} -Wundef -msse -pipe -Wfatal-errors -Wno-return-type-c-linkage -Wno-unused-local-typedef ${TORQUE_ADDITIONAL_LINKER_FLAGS}") + if(CMAKE_SYSTEM_PROCESSOR STREQUAL "arm64" OR "aarch64") + if (CMAKE_CXX_COMPILER_ID MATCHES "Clang") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CXX_FLAG32} -Wundef -pipe -Wfatal-errors -Wno-return-type-c-linkage -Wno-unused-local-typedef ${TORQUE_ADDITIONAL_LINKER_FLAGS}") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${CXX_FLAG32} -Wundef -pipe -Wfatal-errors -Wno-return-type-c-linkage -Wno-unused-local-typedef ${TORQUE_ADDITIONAL_LINKER_FLAGS}") + else() + # default compiler flags + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CXX_FLAG32} -Wundef -pipe -Wfatal-errors -no-pie ${TORQUE_ADDITIONAL_LINKER_FLAGS} -Wl,-rpath,'$$ORIGIN'") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${CXX_FLAG32} -Wundef -pipe -Wfatal-errors ${TORQUE_ADDITIONAL_LINKER_FLAGS} -Wl,-rpath,'$$ORIGIN'") + endif() else() - # default compiler flags - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CXX_FLAG32} -Wundef -msse -pipe -Wfatal-errors -no-pie ${TORQUE_ADDITIONAL_LINKER_FLAGS} -Wl,-rpath,'$$ORIGIN'") - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${CXX_FLAG32} -Wundef -msse -pipe -Wfatal-errors ${TORQUE_ADDITIONAL_LINKER_FLAGS} -Wl,-rpath,'$$ORIGIN'") + if (CMAKE_CXX_COMPILER_ID MATCHES "Clang") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CXX_FLAG32} -Wundef -msse -pipe -Wfatal-errors -Wno-return-type-c-linkage -Wno-unused-local-typedef ${TORQUE_ADDITIONAL_LINKER_FLAGS}") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${CXX_FLAG32} -Wundef -msse -pipe -Wfatal-errors -Wno-return-type-c-linkage -Wno-unused-local-typedef ${TORQUE_ADDITIONAL_LINKER_FLAGS}") + else() + # default compiler flags + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CXX_FLAG32} -Wundef -msse -pipe -Wfatal-errors -no-pie ${TORQUE_ADDITIONAL_LINKER_FLAGS} -Wl,-rpath,'$$ORIGIN'") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${CXX_FLAG32} -Wundef -msse -pipe -Wfatal-errors ${TORQUE_ADDITIONAL_LINKER_FLAGS} -Wl,-rpath,'$$ORIGIN'") + endif() + endif() - endif() set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 ") endif() From 9663296537e5bab69eca404e675b1e9b97f546f2 Mon Sep 17 00:00:00 2001 From: WageCrusader <86795536+WageCrusader@users.noreply.github.com> Date: Mon, 12 Feb 2024 04:05:01 -0600 Subject: [PATCH 2/3] minor refactor to distinguish OpenGL files --- engine/source/platform/platformGL.h | 2 +- engine/source/platformOSX/{ => GL}/osxGL.mm | 2 +- engine/source/platformOSX/{ => GL}/osxOpenGLDevice.h | 0 engine/source/platformOSX/{ => GL}/osxOpenGLDevice.mm | 4 ++-- engine/source/platformOSX/{ => GL}/osxOutlineGL.cc | 2 +- engine/source/platformOSX/{ => GL}/osxOutlineGL.h | 0 engine/source/platformOSX/{ => GL}/platformGL.h | 2 +- engine/source/platformOSX/osxWindow.mm | 2 +- tools/CMake/torque2d.cmake | 2 +- 9 files changed, 8 insertions(+), 8 deletions(-) rename engine/source/platformOSX/{ => GL}/osxGL.mm (97%) rename engine/source/platformOSX/{ => GL}/osxOpenGLDevice.h (100%) rename engine/source/platformOSX/{ => GL}/osxOpenGLDevice.mm (99%) rename engine/source/platformOSX/{ => GL}/osxOutlineGL.cc (96%) rename engine/source/platformOSX/{ => GL}/osxOutlineGL.h (100%) rename engine/source/platformOSX/{ => GL}/platformGL.h (99%) diff --git a/engine/source/platform/platformGL.h b/engine/source/platform/platformGL.h index 927027548..8a61fa0a5 100755 --- a/engine/source/platform/platformGL.h +++ b/engine/source/platform/platformGL.h @@ -23,7 +23,7 @@ #ifndef _PLATFORMGL_H_ // redirect to appropriate platform file #if defined(TORQUE_OS_OSX) -#include "platformOSX/platformGL.h" +#include "platformOSX/GL/platformGL.h" #elif defined(TORQUE_OS_WIN) #include "platformWin32/platformGL.h" #elif defined(TORQUE_OS_LINUX) || defined(TORQUE_OS_OPENBSD) || defined(TORQUE_OS_FREEBSD) diff --git a/engine/source/platformOSX/osxGL.mm b/engine/source/platformOSX/GL/osxGL.mm similarity index 97% rename from engine/source/platformOSX/osxGL.mm rename to engine/source/platformOSX/GL/osxGL.mm index d866ecd64..711f77faa 100755 --- a/engine/source/platformOSX/osxGL.mm +++ b/engine/source/platformOSX/GL/osxGL.mm @@ -25,7 +25,7 @@ // which contains the workaround. #include #include "platformOSX/platformOSX.h" -#include "platformOSX/platformGL.h" +#include "platformGL.h" #include "console/console.h" #include "graphics/dgl.h" diff --git a/engine/source/platformOSX/osxOpenGLDevice.h b/engine/source/platformOSX/GL/osxOpenGLDevice.h similarity index 100% rename from engine/source/platformOSX/osxOpenGLDevice.h rename to engine/source/platformOSX/GL/osxOpenGLDevice.h diff --git a/engine/source/platformOSX/osxOpenGLDevice.mm b/engine/source/platformOSX/GL/osxOpenGLDevice.mm similarity index 99% rename from engine/source/platformOSX/osxOpenGLDevice.mm rename to engine/source/platformOSX/GL/osxOpenGLDevice.mm index 72ea22881..104bbe2c6 100755 --- a/engine/source/platformOSX/osxOpenGLDevice.mm +++ b/engine/source/platformOSX/GL/osxOpenGLDevice.mm @@ -20,8 +20,8 @@ // IN THE SOFTWARE. //----------------------------------------------------------------------------- #import "platformOSX/platformOSX.h" -#import "platformOSX/osxOpenGLDevice.h" -#import "platformOSX/platformGL.h" +#import "osxOpenGLDevice.h" +#import "platformGL.h" #include "console/console.h" #include "game/gameInterface.h" #include "graphics/dgl.h" diff --git a/engine/source/platformOSX/osxOutlineGL.cc b/engine/source/platformOSX/GL/osxOutlineGL.cc similarity index 96% rename from engine/source/platformOSX/osxOutlineGL.cc rename to engine/source/platformOSX/GL/osxOutlineGL.cc index 06d0449a5..d49b54359 100755 --- a/engine/source/platformOSX/osxOutlineGL.cc +++ b/engine/source/platformOSX/GL/osxOutlineGL.cc @@ -28,7 +28,7 @@ #define NO_REDEFINE_GL_FUNCS -#include "platformOSX/platformGL.h" +#include "platformGL.h" #include "console/console.h" bool gOutlineEnabled = false; diff --git a/engine/source/platformOSX/osxOutlineGL.h b/engine/source/platformOSX/GL/osxOutlineGL.h similarity index 100% rename from engine/source/platformOSX/osxOutlineGL.h rename to engine/source/platformOSX/GL/osxOutlineGL.h diff --git a/engine/source/platformOSX/platformGL.h b/engine/source/platformOSX/GL/platformGL.h similarity index 99% rename from engine/source/platformOSX/platformGL.h rename to engine/source/platformOSX/GL/platformGL.h index baa6453f2..c91e1bf94 100755 --- a/engine/source/platformOSX/platformGL.h +++ b/engine/source/platformOSX/GL/platformGL.h @@ -38,7 +38,7 @@ /// Allows outline mode drawing via a function pointer swapping trick. /// Must be included AFTER all the OpenGL headers. -#include "platformOSX/osxOutlineGL.h" +#include "platformOSX/GL/osxOutlineGL.h" //------------------------------------------------------------------------------ diff --git a/engine/source/platformOSX/osxWindow.mm b/engine/source/platformOSX/osxWindow.mm index 66fad0069..2ddd2402d 100755 --- a/engine/source/platformOSX/osxWindow.mm +++ b/engine/source/platformOSX/osxWindow.mm @@ -21,7 +21,7 @@ //----------------------------------------------------------------------------- #import "platformOSX/platformOSX.h" -#include "platformOSX/osxOpenGLDevice.h" +#include "platformOSX/GL/osxOpenGLDevice.h" //------------------------------------------------------------------------------ diff --git a/tools/CMake/torque2d.cmake b/tools/CMake/torque2d.cmake index b3f2d40d9..0fe4cbc03 100644 --- a/tools/CMake/torque2d.cmake +++ b/tools/CMake/torque2d.cmake @@ -251,7 +251,7 @@ if(WIN32) endif() if(APPLE) - addPath("${srcDir}/platformOSX") + addPathRec("${srcDir}/platformOSX") endif() if(UNIX AND NOT APPLE) From f6b05d7734ca6c0cf7d83f369630f62a186422bb Mon Sep 17 00:00:00 2001 From: WageCrusader <86795536+WageCrusader@users.noreply.github.com> Date: Sat, 17 Feb 2024 16:22:09 -0600 Subject: [PATCH 3/3] hiDPI hack --- engine/source/platformOSX/platformOSX.mm | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/engine/source/platformOSX/platformOSX.mm b/engine/source/platformOSX/platformOSX.mm index d4b968672..6b6241ade 100755 --- a/engine/source/platformOSX/platformOSX.mm +++ b/engine/source/platformOSX/platformOSX.mm @@ -126,9 +126,8 @@ -(void) updateWindowTitle:(const char*)title - (void)setWindowSize:(int)width height:(int)height { // Store the width and height in the state - _windowSize.x = width; - _windowSize.y = height; - + _windowSize.x = width * NSScreen.mainScreen.backingScaleFactor; // TODO: See if there's a better solution than this - WageCrusader + _windowSize.y = height * NSScreen.mainScreen.backingScaleFactor; // TODO: See if there's a better solution than this - WageCrusader // Get the window's current frame NSRect frame = NSMakeRect([_window frame].origin.x, [_window frame].origin.y, width, height);