Standardize location of storage-class specifiers: Place at beginning of declarations

Justification: C99 specifies that doing otherwise is an obsolescent feature.
This commit is contained in:
MerryMage 2017-09-29 01:23:45 +01:00
parent b992e5f8ec
commit 29471be317
7 changed files with 7 additions and 7 deletions

View file

@ -28,7 +28,7 @@ public:
Xbyak::Address GetConstant(u64 constant);
private:
constexpr static size_t align_size = 16; // bytes
static constexpr size_t align_size = 16; // bytes
std::map<u64, void*> constant_info;

View file

@ -291,7 +291,7 @@ void RegAlloc::HostCall(IR::Inst* result_def, boost::optional<Argument&> arg0, b
constexpr std::array<HostLoc, args_count> args_hostloc = { ABI_PARAM1, ABI_PARAM2, ABI_PARAM3, ABI_PARAM4 };
const std::array<boost::optional<Argument&>, args_count> args = { arg0, arg1, arg2, arg3 };
const static std::vector<HostLoc> other_caller_save = [args_hostloc]() {
static const std::vector<HostLoc> other_caller_save = [args_hostloc]() {
std::vector<HostLoc> ret(ABI_ALL_CALLER_SAVE.begin(), ABI_ALL_CALLER_SAVE.end());
for (auto hostloc : args_hostloc)

View file

@ -322,7 +322,7 @@ std::vector<ArmMatcher<V>> GetArmDecodeTable() {
template<typename V>
boost::optional<const ArmMatcher<V>&> DecodeArm(u32 instruction) {
const static auto table = GetArmDecodeTable<V>();
static const auto table = GetArmDecodeTable<V>();
const auto matches_instruction = [instruction](const auto& matcher) { return matcher.Matches(instruction); };

View file

@ -22,7 +22,7 @@ using Thumb16Matcher = Matcher<Visitor, u16>;
template<typename V>
boost::optional<const Thumb16Matcher<V>&> DecodeThumb16(u16 instruction) {
const static std::vector<Thumb16Matcher<V>> table = {
static const std::vector<Thumb16Matcher<V>> table = {
#define INST(fn, name, bitstring) detail::detail<Thumb16Matcher<V>>::GetMatcher(fn, name, bitstring)

View file

@ -22,7 +22,7 @@ using Thumb32Matcher = Matcher<Visitor, u32>;
template<typename V>
boost::optional<const Thumb32Matcher<V>&> DecodeThumb32(u32 instruction) {
const static std::vector<Thumb32Matcher<V>> table = {
static const std::vector<Thumb32Matcher<V>> table = {
#define INST(fn, name, bitstring) detail::detail<Thumb32Matcher<V>>::GetMatcher(fn, name, bitstring)

View file

@ -22,7 +22,7 @@ using VFP2Matcher = Matcher<Visitor, u32>;
template<typename V>
boost::optional<const VFP2Matcher<V>&> DecodeVFP2(u32 instruction) {
const static std::vector<VFP2Matcher<V>> table = {
static const std::vector<VFP2Matcher<V>> table = {
#define INST(fn, name, bitstring) detail::detail<VFP2Matcher<V>>::GetMatcher(fn, name, bitstring)

View file

@ -50,7 +50,7 @@ const char* GetNameOf(Opcode op) {
}
const char* GetNameOf(Type type) {
const static std::array<const char*, 12> names = {
static const std::array<const char*, 12> names = {
"Void", "RegRef", "ExtRegRef", "Opaque", "U1", "U8", "U16", "U32", "U64", "F32", "F64", "CoprocInfo"
};
return names.at(static_cast<size_t>(type));