Setting /permissive- to make MSVC more "standard" (#3701)
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
This commit is contained in:
@@ -19,6 +19,7 @@
|
||||
#include <AzCore/std/typetraits/is_member_pointer.h>
|
||||
#include <AzCore/std/typetraits/is_const.h>
|
||||
#include <AzCore/std/typetraits/remove_cvref.h>
|
||||
#include <AzCore/std/typetraits/is_volatile.h>
|
||||
#include <AzCore/std/createdestroy.h>
|
||||
|
||||
#define AZSTD_FUNCTION_TARGET_FIX(x)
|
||||
@@ -591,8 +592,8 @@ namespace AZStd
|
||||
|
||||
Internal::function_util::function_buffer type_result;
|
||||
type_result.type.type = aztypeid(Functor);
|
||||
type_result.type.const_qualified = is_const<Functor>::value;
|
||||
type_result.type.volatile_qualified = is_volatile<Functor>::value;
|
||||
type_result.type.const_qualified = AZStd::is_const<Functor>::value;
|
||||
type_result.type.volatile_qualified = AZStd::is_volatile<Functor>::value;
|
||||
vtable->manager(functor, type_result, Internal::function_util::check_functor_type_tag);
|
||||
return static_cast<Functor*>(type_result.obj_ptr);
|
||||
}
|
||||
@@ -608,7 +609,7 @@ namespace AZStd
|
||||
Internal::function_util::function_buffer type_result;
|
||||
type_result.type.type = aztypeid(Functor);
|
||||
type_result.type.const_qualified = true;
|
||||
type_result.type.volatile_qualified = is_volatile<Functor>::value;
|
||||
type_result.type.volatile_qualified = AZStd::is_volatile<Functor>::value;
|
||||
vtable->manager(functor, type_result, Internal::function_util::check_functor_type_tag);
|
||||
// GCC 2.95.3 gets the CV qualifiers wrong here, so we
|
||||
// can't do the static_cast that we should do.
|
||||
|
||||
@@ -359,7 +359,7 @@ namespace AZStd
|
||||
{
|
||||
functor.obj_ref.obj_ptr = (void*)&f.get();
|
||||
functor.obj_ref.is_const_qualified = is_const<FunctionObj>::value;
|
||||
functor.obj_ref.is_volatile_qualified = is_volatile<FunctionObj>::value;
|
||||
functor.obj_ref.is_volatile_qualified = AZStd::is_volatile<FunctionObj>::value;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
|
||||
@@ -70,11 +70,11 @@ namespace AZStd
|
||||
bool try_acquire_until(const chrono::time_point<Clock, Duration>& abs_time)
|
||||
{
|
||||
auto timeNow = chrono::system_clock::now();
|
||||
if (timeNow >= absTime)
|
||||
if (timeNow >= abs_time)
|
||||
{
|
||||
return false; // we timed out already!
|
||||
}
|
||||
auto deltaTime = absTime - timeNow;
|
||||
auto deltaTime = abs_time - timeNow;
|
||||
auto timeToTry = chrono::duration_cast<chrono::milliseconds>(deltaTime);
|
||||
return (WaitForSingleObject(m_event, aznumeric_cast<DWORD>(timeToTry.count())) == AZ_WAIT_OBJECT_0);
|
||||
}
|
||||
|
||||
+2
-2
@@ -198,7 +198,7 @@ namespace AZStd
|
||||
AZ_FORCE_INLINE cv_status condition_variable_any::wait_for(Lock& lock, const chrono::duration<Rep, Period>& rel_time)
|
||||
{
|
||||
chrono::milliseconds toWait = rel_time;
|
||||
EnterCriticalSection(&m_mutex);
|
||||
EnterCriticalSection(static_cast<LPCRITICAL_SECTION>(&m_mutex));
|
||||
lock.unlock();
|
||||
|
||||
// We need to make sure we use CriticalSection based mutex.
|
||||
@@ -217,7 +217,7 @@ namespace AZStd
|
||||
returnCode = cv_status::timeout;
|
||||
}
|
||||
}
|
||||
LeaveCriticalSection(&m_mutex);
|
||||
LeaveCriticalSection(static_cast<LPCRITICAL_SECTION>(&m_mutex));
|
||||
lock.lock();
|
||||
return returnCode;
|
||||
}
|
||||
|
||||
@@ -2100,8 +2100,8 @@ namespace UnitTest
|
||||
typename TypeParam::ContainerType container;
|
||||
container.emplace(-2352);
|
||||
container.emplace(3534);
|
||||
container.emplace(1535408957);
|
||||
container.emplace(3310556522);
|
||||
container.emplace(535408957);
|
||||
container.emplace(1310556522);
|
||||
container.emplace(55546193);
|
||||
container.emplace(1582);
|
||||
|
||||
|
||||
@@ -1805,8 +1805,8 @@ namespace UnitTest
|
||||
typename TypeParam::ContainerType container;
|
||||
container.emplace(-2352);
|
||||
container.emplace(3534);
|
||||
container.emplace(1535408957);
|
||||
container.emplace(3310556522);
|
||||
container.emplace(535408957);
|
||||
container.emplace(1310556522);
|
||||
container.emplace(55546193);
|
||||
container.emplace(1582);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user