Linux and non-unity build fixes
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
#include <AzCore/RTTI/TypeInfoSimple.h>
|
||||
#include <AzCore/std/limits.h>
|
||||
#include <AzCore/std/string/string_view.h>
|
||||
#include <AzCore/Casting/numeric_cast.h>
|
||||
|
||||
namespace AZ::Debug
|
||||
{
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
#include <AzCore/Math/MathUtils.h>
|
||||
#include <AzCore/std/typetraits/is_const.h>
|
||||
#include <AzCore/std/typetraits/has_member_function.h>
|
||||
#include <AzCore/Casting/numeric_cast.h>
|
||||
|
||||
namespace AZ
|
||||
{
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
#include <AzCore/IO/SystemFile.h>
|
||||
#include <AzCore/IO/IOUtils.h>
|
||||
#include <AzCore/std/algorithm.h>
|
||||
#include <AzCore/Casting/numeric_cast.h>
|
||||
|
||||
namespace AZ::IO
|
||||
{
|
||||
|
||||
@@ -109,6 +109,19 @@
|
||||
#define AZ_TRAIT_USE_ERRNO_T_TYPEDEF 1
|
||||
#define AZ_TRAIT_USE_POSIX_TEMP_FOLDER 0
|
||||
|
||||
// wchar_t/char formatting
|
||||
// Reason: https://docs.microsoft.com/en-us/cpp/c-runtime-library/format-specification-syntax-printf-and-wprintf-functions?view=msvc-160
|
||||
// The Z type character, and the behavior of the c, C, s, and S type characters when they're used with the printf and wprintf functions,
|
||||
// are Microsoft extensions. The ISO C standard uses c and s consistently for narrow characters and strings, and C and S for wide characters
|
||||
// and strings, in all formatting functions.
|
||||
#define AZ_TRAIT_FORMAT_STRING_PRINTF_CHAR "%c"
|
||||
#define AZ_TRAIT_FORMAT_STRING_PRINTF_WCHAR "%C"
|
||||
#define AZ_TRAIT_FORMAT_STRING_WPRINTF_CHAR "%c"
|
||||
#define AZ_TRAIT_FORMAT_STRING_WPRINTF_WCHAR "%C"
|
||||
#define AZ_TRAIT_FORMAT_STRING_PRINTF_STRING "%s"
|
||||
#define AZ_TRAIT_FORMAT_STRING_PRINTF_WSTRING "%S"
|
||||
#define AZ_TRAIT_FORMAT_STRING_WPRINTF_STRING "%s"
|
||||
#define AZ_TRAIT_FORMAT_STRING_WPRINTF_WSTRING "%S"
|
||||
// Legacy traits ...
|
||||
#define AZ_TRAIT_LEGACY_CRYCOMMON_USE_WINDOWS_STUBS 1
|
||||
#define AZ_TRAIT_LEGACY_CRYPAK_UNIX_LIKE_FILE_SYSTEM 1
|
||||
|
||||
@@ -109,6 +109,20 @@
|
||||
#define AZ_TRAIT_USE_ERRNO_T_TYPEDEF 1
|
||||
#define AZ_TRAIT_USE_POSIX_TEMP_FOLDER 1
|
||||
|
||||
// wchar_t/char formatting
|
||||
// Reason: https://docs.microsoft.com/en-us/cpp/c-runtime-library/format-specification-syntax-printf-and-wprintf-functions?view=msvc-160
|
||||
// The Z type character, and the behavior of the c, C, s, and S type characters when they're used with the printf and wprintf functions,
|
||||
// are Microsoft extensions. The ISO C standard uses c and s consistently for narrow characters and strings, and C and S for wide characters
|
||||
// and strings, in all formatting functions.
|
||||
#define AZ_TRAIT_FORMAT_STRING_PRINTF_CHAR "%c"
|
||||
#define AZ_TRAIT_FORMAT_STRING_PRINTF_WCHAR "%C"
|
||||
#define AZ_TRAIT_FORMAT_STRING_WPRINTF_CHAR "%c"
|
||||
#define AZ_TRAIT_FORMAT_STRING_WPRINTF_WCHAR "%C"
|
||||
#define AZ_TRAIT_FORMAT_STRING_PRINTF_STRING "%s"
|
||||
#define AZ_TRAIT_FORMAT_STRING_PRINTF_WSTRING "%S"
|
||||
#define AZ_TRAIT_FORMAT_STRING_WPRINTF_STRING "%s"
|
||||
#define AZ_TRAIT_FORMAT_STRING_WPRINTF_WSTRING "%S"
|
||||
|
||||
// Legacy traits ...
|
||||
#define AZ_TRAIT_LEGACY_CRYCOMMON_USE_WINDOWS_STUBS 1
|
||||
#define AZ_TRAIT_LEGACY_CRYPAK_UNIX_LIKE_FILE_SYSTEM 1
|
||||
|
||||
@@ -109,6 +109,20 @@
|
||||
#define AZ_TRAIT_USE_ERRNO_T_TYPEDEF 0
|
||||
#define AZ_TRAIT_USE_POSIX_TEMP_FOLDER 1
|
||||
|
||||
// wchar_t/char formatting
|
||||
// Reason: https://docs.microsoft.com/en-us/cpp/c-runtime-library/format-specification-syntax-printf-and-wprintf-functions?view=msvc-160
|
||||
// The Z type character, and the behavior of the c, C, s, and S type characters when they're used with the printf and wprintf functions,
|
||||
// are Microsoft extensions. The ISO C standard uses c and s consistently for narrow characters and strings, and C and S for wide characters
|
||||
// and strings, in all formatting functions.
|
||||
#define AZ_TRAIT_FORMAT_STRING_PRINTF_CHAR "%c"
|
||||
#define AZ_TRAIT_FORMAT_STRING_PRINTF_WCHAR "%C"
|
||||
#define AZ_TRAIT_FORMAT_STRING_WPRINTF_CHAR "%c"
|
||||
#define AZ_TRAIT_FORMAT_STRING_WPRINTF_WCHAR "%C"
|
||||
#define AZ_TRAIT_FORMAT_STRING_PRINTF_STRING "%s"
|
||||
#define AZ_TRAIT_FORMAT_STRING_PRINTF_WSTRING "%S"
|
||||
#define AZ_TRAIT_FORMAT_STRING_WPRINTF_STRING "%s"
|
||||
#define AZ_TRAIT_FORMAT_STRING_WPRINTF_WSTRING "%S"
|
||||
|
||||
// Legacy traits ...
|
||||
#define AZ_TRAIT_LEGACY_CRYCOMMON_USE_WINDOWS_STUBS 1
|
||||
#define AZ_TRAIT_LEGACY_CRYPAK_UNIX_LIKE_FILE_SYSTEM 1
|
||||
|
||||
@@ -109,6 +109,20 @@
|
||||
#define AZ_TRAIT_USE_ERRNO_T_TYPEDEF 0
|
||||
#define AZ_TRAIT_USE_POSIX_TEMP_FOLDER 0
|
||||
|
||||
// wchar_t/char formatting
|
||||
// Reason: https://docs.microsoft.com/en-us/cpp/c-runtime-library/format-specification-syntax-printf-and-wprintf-functions?view=msvc-160
|
||||
// The Z type character, and the behavior of the c, C, s, and S type characters when they're used with the printf and wprintf functions,
|
||||
// are Microsoft extensions. The ISO C standard uses c and s consistently for narrow characters and strings, and C and S for wide characters
|
||||
// and strings, in all formatting functions.
|
||||
#define AZ_TRAIT_FORMAT_STRING_PRINTF_CHAR "%c"
|
||||
#define AZ_TRAIT_FORMAT_STRING_PRINTF_WCHAR "%C"
|
||||
#define AZ_TRAIT_FORMAT_STRING_WPRINTF_CHAR "%C"
|
||||
#define AZ_TRAIT_FORMAT_STRING_WPRINTF_WCHAR "%c"
|
||||
#define AZ_TRAIT_FORMAT_STRING_PRINTF_STRING "%s"
|
||||
#define AZ_TRAIT_FORMAT_STRING_PRINTF_WSTRING "%S"
|
||||
#define AZ_TRAIT_FORMAT_STRING_WPRINTF_STRING "%S"
|
||||
#define AZ_TRAIT_FORMAT_STRING_WPRINTF_WSTRING "%s"
|
||||
|
||||
// Legacy traits ...
|
||||
#define AZ_TRAIT_LEGACY_CRYCOMMON_USE_WINDOWS_STUBS 0
|
||||
#define AZ_TRAIT_LEGACY_CRYPAK_UNIX_LIKE_FILE_SYSTEM 0
|
||||
|
||||
@@ -110,6 +110,20 @@
|
||||
#define AZ_TRAIT_USE_ERRNO_T_TYPEDEF 0
|
||||
#define AZ_TRAIT_USE_POSIX_TEMP_FOLDER 0
|
||||
|
||||
// wchar_t/char formatting
|
||||
// Reason: https://docs.microsoft.com/en-us/cpp/c-runtime-library/format-specification-syntax-printf-and-wprintf-functions?view=msvc-160
|
||||
// The Z type character, and the behavior of the c, C, s, and S type characters when they're used with the printf and wprintf functions,
|
||||
// are Microsoft extensions. The ISO C standard uses c and s consistently for narrow characters and strings, and C and S for wide characters
|
||||
// and strings, in all formatting functions.
|
||||
#define AZ_TRAIT_FORMAT_STRING_PRINTF_CHAR "%c"
|
||||
#define AZ_TRAIT_FORMAT_STRING_PRINTF_WCHAR "%C"
|
||||
#define AZ_TRAIT_FORMAT_STRING_WPRINTF_CHAR "%c"
|
||||
#define AZ_TRAIT_FORMAT_STRING_WPRINTF_WCHAR "%C"
|
||||
#define AZ_TRAIT_FORMAT_STRING_PRINTF_STRING "%s"
|
||||
#define AZ_TRAIT_FORMAT_STRING_PRINTF_WSTRING "%S"
|
||||
#define AZ_TRAIT_FORMAT_STRING_WPRINTF_STRING "%s"
|
||||
#define AZ_TRAIT_FORMAT_STRING_WPRINTF_WSTRING "%S"
|
||||
|
||||
// Legacy traits ...
|
||||
#define AZ_TRAIT_LEGACY_CRYCOMMON_USE_WINDOWS_STUBS 1
|
||||
#define AZ_TRAIT_LEGACY_CRYPAK_UNIX_LIKE_FILE_SYSTEM 1
|
||||
|
||||
@@ -1462,12 +1462,12 @@ namespace UnitTest
|
||||
|
||||
// This shouldn't give a compile error
|
||||
AZStd::string::format(
|
||||
"%i %c %uc %hc %lc %i %i %u %i %lu %li %llu %lli %f %f %hs %ls %p",
|
||||
"%i %c %uc " AZ_TRAIT_FORMAT_STRING_PRINTF_CHAR AZ_TRAIT_FORMAT_STRING_PRINTF_WCHAR " %i %i %u %i %lu %li %llu %lli %f %f " AZ_TRAIT_FORMAT_STRING_PRINTF_STRING AZ_TRAIT_FORMAT_STRING_PRINTF_WSTRING " %p",
|
||||
v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18);
|
||||
|
||||
// This shouldn't give a compile error
|
||||
AZStd::wstring::format(
|
||||
L"%i %c %uc %hc %lc %i %i %u %i %lu %li %llu %lli %f %f %hs %ls %p",
|
||||
L"%i %c %uc " AZ_TRAIT_FORMAT_STRING_WPRINTF_CHAR AZ_TRAIT_FORMAT_STRING_WPRINTF_WCHAR " %i %i %u %i %lu %li %llu %lli %f %f " AZ_TRAIT_FORMAT_STRING_WPRINTF_STRING AZ_TRAIT_FORMAT_STRING_WPRINTF_WSTRING " %p",
|
||||
v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18);
|
||||
|
||||
class WrappedInt
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
|
||||
#include <AzCore/Math/Sfmt.h>
|
||||
#include <AzCore/UnitTest/TestTypes.h>
|
||||
#include <AzCore/Math/Vector4.h>
|
||||
|
||||
using namespace AZ;
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ namespace AZ
|
||||
{
|
||||
if (alignment == 0)
|
||||
{
|
||||
// Some STL containers, like std::vector, are assuming a specific minimum alignment. seems to have a requirement
|
||||
// Some STL containers, like std::vector, seem to have a requirement where a specific minimum alignment will be chosen when the alignment is set to 0
|
||||
// Take a look at _Allocate_manually_vector_aligned in xmemory0
|
||||
alignment = sizeof(void*) * 2;
|
||||
}
|
||||
@@ -39,7 +39,7 @@ namespace AZ
|
||||
{
|
||||
if (newAlignment == 0)
|
||||
{
|
||||
// Some STL containers, like std::vector, are assuming a specific minimum alignment. seems to have a requirement
|
||||
// Some STL containers, like std::vector, seem to have a requirement where a specific minimum alignment will be chosen when the alignment is set to 0
|
||||
// Take a look at _Allocate_manually_vector_aligned in xmemory0
|
||||
newAlignment = sizeof(void*) * 2;
|
||||
}
|
||||
@@ -63,7 +63,7 @@ namespace AZ
|
||||
{
|
||||
if (newAlignment == 0)
|
||||
{
|
||||
// Some STL containers, like std::vector, are assuming a specific minimum alignment. seems to have a requirement
|
||||
// Some STL containers, like std::vector, seem to have a requirement where a specific minimum alignment will be chosen when the alignment is set to 0
|
||||
// Take a look at _Allocate_manually_vector_aligned in xmemory0
|
||||
newAlignment = sizeof(void*) * 2;
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <AzCore/std/containers/vector.h>
|
||||
#include <AzCore/Casting/numeric_cast.h>
|
||||
|
||||
namespace AZ
|
||||
{
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
#include <AzCore/Debug/Timer.h>
|
||||
#include <AzCore/Name/Name.h>
|
||||
#include <AzCore/std/containers/vector.h>
|
||||
#include <AzCore/Casting/numeric_cast.h>
|
||||
|
||||
namespace AZ
|
||||
{
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
#include "KeyboardShortcutManager.h"
|
||||
#include <AzCore/std/algorithm.h>
|
||||
#include <AzCore/std/string/string_view.h>
|
||||
#include <AzCore/Casting/numeric_cast.h>
|
||||
|
||||
#include <MCore/Source/LogManager.h>
|
||||
#include <MCore/Source/IDGenerator.h>
|
||||
|
||||
Reference in New Issue
Block a user