mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2024-11-27 22:32:15 +00:00
lib: simplify pragma macros
This commit is contained in:
parent
a3ba767fba
commit
5c5789eadf
6 changed files with 9 additions and 14 deletions
|
@ -30,7 +30,7 @@
|
|||
#include <vapours/assert.hpp>
|
||||
#include <vapours/util/util_type_traits.hpp>
|
||||
|
||||
AMS_PRAGMA_BEGIN_OPTIMIZE_O3()
|
||||
AMS_PRAGMA_BEGIN_OPTIMIZE("-O3")
|
||||
|
||||
/*
|
||||
* This file defines data structures for red-black trees.
|
||||
|
|
|
@ -20,8 +20,7 @@
|
|||
#define AMS_PRAGMA(X) \
|
||||
_Pragma(#X)
|
||||
|
||||
#define AMS_PRAGMA_BEGIN_OPTIMIZE_O3()
|
||||
#define AMS_PRAGMA_BEGIN_OPTIMIZE_OS()
|
||||
#define AMS_PRAGMA_BEGIN_OPTIMIZE(X)
|
||||
#define AMS_PRAGMA_END_OPTIMIZE()
|
||||
|
||||
#define AMS_PRAGMA_BEGIN_PACK(n) \
|
||||
|
|
|
@ -20,16 +20,12 @@
|
|||
#define AMS_PRAGMA(X) \
|
||||
_Pragma(#X)
|
||||
|
||||
#define AMS_PRAGMA_BEGIN_OPTIMIZE_O3() \
|
||||
_Pragma("GCC push_options") \
|
||||
_Pragma("GCC optimize (\"-O3\")")
|
||||
|
||||
#define AMS_PRAGMA_BEGIN_OPTIMIZE_OS() \
|
||||
_Pragma("GCC push_options") \
|
||||
_Pragma("GCC optimize (\"-Os\")")
|
||||
#define AMS_PRAGMA_BEGIN_OPTIMIZE(X) \
|
||||
AMS_PRAGMA(GCC push_options) \
|
||||
AMS_PRAGMA(GCC optimize(X))
|
||||
|
||||
#define AMS_PRAGMA_END_OPTIMIZE() \
|
||||
_Pragma("GCC pop_options")
|
||||
AMS_PRAGMA(GCC pop_options)
|
||||
|
||||
#define AMS_PRAGMA_BEGIN_PACK(n) \
|
||||
AMS_PRAGMA(pack(push, n))
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
namespace ams::util {
|
||||
|
||||
AMS_PRAGMA_BEGIN_OPTIMIZE_O3()
|
||||
AMS_PRAGMA_BEGIN_OPTIMIZE("-O3")
|
||||
|
||||
/* Forward declare implementation class for Node. */
|
||||
namespace impl {
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
namespace ams::util {
|
||||
|
||||
AMS_PRAGMA_BEGIN_OPTIMIZE_O3()
|
||||
AMS_PRAGMA_BEGIN_OPTIMIZE("-O3")
|
||||
|
||||
namespace impl {
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
namespace ams::util {
|
||||
|
||||
AMS_PRAGMA_BEGIN_OPTIMIZE_O3()
|
||||
AMS_PRAGMA_BEGIN_OPTIMIZE("-Os")
|
||||
|
||||
namespace {
|
||||
|
||||
|
|
Loading…
Reference in a new issue