Code cleanup: removing cxx_compat.h

This commit is contained in:
Ben Vanik 2015-05-02 10:55:22 -07:00
parent f8a2ed205e
commit d9e4bc98e1
4 changed files with 0 additions and 54 deletions

View File

@ -1,51 +0,0 @@
/**
******************************************************************************
* Xenia : Xbox 360 Emulator Research Project *
******************************************************************************
* Copyright 2014 Ben Vanik. All rights reserved. *
* Released under the BSD license - see LICENSE in the root for more details. *
******************************************************************************
*/
#ifndef XENIA_BASE_CXX_COMPAT_H_
#define XENIA_BASE_CXX_COMPAT_H_
#include <memory>
#include "xenia/base/platform.h"
// C++11 thread local storage.
// http://en.cppreference.com/w/cpp/language/storage_duration
#if XE_COMPILER_MSVC
// VC++2014 may have this.
#define _ALLOW_KEYWORD_MACROS 1
#define thread_local __declspec(thread)
#elif XE_PLATFORM_MAC
// Clang supports it on OSX but the runtime doesn't.
#define thread_local __thread
#endif // XE_COMPILER_MSVC
// C++11 alignas keyword.
// This will hopefully be coming soon, as most of the alignment spec is in the
// latest CTP.
#if XE_COMPILER_MSVC
#define alignas(N) __declspec(align(N))
#endif // XE_COMPILER_MSVC
#if !XE_COMPILER_MSVC
// C++1y make_unique.
// http://herbsutter.com/2013/05/29/gotw-89-solution-smart-pointers/
// This is present in clang with -std=c++1y, but not otherwise.
#if __clang_major__ < 3 || (__clang_major__ == 3 && __clang_minor__ < 4)
namespace std {
template <typename T, typename... Args>
unique_ptr<T> make_unique(Args&&... args) {
return unique_ptr<T>(new T(forward<Args>(args)...));
}
} // namespace std
#endif // clang < 3.4
#endif // !XE_COMPILER_MSVC
namespace xe {} // namespace xe
#endif // XENIA_BASE_CXX_COMPAT_H_

View File

@ -8,7 +8,6 @@
'byte_order.h',
'debugging.h',
'delegate.h',
'cxx_compat.h',
'fs.h',
'fs.cc',
'logging.cc',

View File

@ -9,7 +9,6 @@
#include "xenia/gpu/gl4/draw_batcher.h"
#include "xenia/base/cxx_compat.h"
#include "xenia/base/logging.h"
#include "xenia/base/math.h"
#include "xenia/gpu/gl4/gl4_gpu-private.h"

View File

@ -12,7 +12,6 @@
#include "third_party/microprofile/microprofileui.h"
#include "xenia/base/assert.h"
#include "xenia/base/cxx_compat.h"
#include "xenia/base/math.h"
#include "xenia/gpu/gpu-private.h"