mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-07-24 05:52:15 +00:00
Officially drop support for Visual Studio 2013, which stopped working after 3a839517ce, fixes #5379.
This was SVN commit r23382.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2019 Wildfire Games.
|
||||
/* Copyright (C) 2020 Wildfire Games.
|
||||
* This file is part of 0 A.D.
|
||||
*
|
||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||
@@ -45,13 +45,13 @@ PASS_BY_VALUE_IN_NATIVE_WRAPPER(double)
|
||||
|
||||
#undef PASS_BY_VALUE_IN_NATIVE_WRAPPER
|
||||
|
||||
// This works around a bug in Visual Studio 2013 (error C2244 if ScriptInterface:: is included in the
|
||||
// This works around a bug in Visual Studio (error C2244 if ScriptInterface:: is included in the
|
||||
// type specifier of MaybeRef<T>::Type for parameters inside the member function declaration).
|
||||
// It's probably the bug described here, but I'm not quite sure (at least the example there still
|
||||
// cause error C2244):
|
||||
// https://connect.microsoft.com/VisualStudio/feedback/details/611863/vs2010-c-fails-with-error-c2244-gcc-4-3-4-compiles-ok
|
||||
//
|
||||
// TODO: When dropping support for VS 2013, check if this bug is still present in the supported
|
||||
// TODO: When dropping support for VS 2015, check if this bug is still present in the supported
|
||||
// Visual Studio versions (replace the macro definitions in NativeWrapperDecls.h with these ones,
|
||||
// remove them from here and check if this causes error C2244 when compiling.
|
||||
#undef NUMBERED_LIST_TAIL_MAYBE_REF
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2019 Wildfire Games.
|
||||
/* Copyright (C) 2020 Wildfire Games.
|
||||
* This file is part of 0 A.D.
|
||||
*
|
||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||
@@ -427,25 +427,6 @@ private:
|
||||
|
||||
struct CustomType
|
||||
{
|
||||
// TODO: Move assignment operator and move constructor only have to be
|
||||
// explicitly defined for Visual Studio. VS2013 is still behind on C++11 support
|
||||
// What's missing is what they call "Rvalue references v3.0", see
|
||||
// https://msdn.microsoft.com/en-us/library/hh567368.aspx#rvref
|
||||
CustomType() {}
|
||||
CustomType& operator=(CustomType&& other)
|
||||
{
|
||||
m_Prototype = std::move(other.m_Prototype);
|
||||
m_Class = std::move(other.m_Class);
|
||||
m_Constructor = std::move(other.m_Constructor);
|
||||
return *this;
|
||||
}
|
||||
CustomType(CustomType&& other)
|
||||
{
|
||||
m_Prototype = std::move(other.m_Prototype);
|
||||
m_Class = std::move(other.m_Class);
|
||||
m_Constructor = std::move(other.m_Constructor);
|
||||
}
|
||||
|
||||
JS::PersistentRootedObject m_Prototype;
|
||||
JSClass* m_Class;
|
||||
JSNative m_Constructor;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2015 Wildfire Games.
|
||||
/* Copyright (C) 2020 Wildfire Games.
|
||||
* This file is part of 0 A.D.
|
||||
*
|
||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||
@@ -78,21 +78,6 @@ public:
|
||||
m_Val.reset(new JS::PersistentRooted<T>(cx, val));
|
||||
}
|
||||
|
||||
// TODO: Move assignment operator and move constructor only have to be
|
||||
// explicitly defined for Visual Studio. VS2013 is still behind on C++11 support
|
||||
// What's missing is what they call "Rvalue references v3.0", see
|
||||
// https://msdn.microsoft.com/en-us/library/hh567368.aspx#rvref
|
||||
DefPersistentRooted<T>& operator=(DefPersistentRooted<T>&& other)
|
||||
{
|
||||
m_Val = std::move(other.m_Val);
|
||||
return *this;
|
||||
}
|
||||
|
||||
DefPersistentRooted<T>(DefPersistentRooted<T>&& other)
|
||||
{
|
||||
m_Val = std::move(other.m_Val);
|
||||
}
|
||||
|
||||
private:
|
||||
std::unique_ptr<JS::PersistentRooted<T> > m_Val;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user