Skip to content

Commit

Permalink
Merge pull request #8083 from Techjar/clang-7-format
Browse files Browse the repository at this point in the history
Reformat repo to clang-format 7.0 rules
  • Loading branch information
leoetlino committed May 6, 2019
2 parents d347867 + ff972e3 commit 6f6c7e5
Show file tree
Hide file tree
Showing 208 changed files with 312 additions and 310 deletions.
2 changes: 1 addition & 1 deletion Source/Android/jni/ButtonManager.cpp
Expand Up @@ -730,4 +730,4 @@ float InputDevice::AxisValue(int padID, ButtonType axis)
else
return _buttons[binding->second->_buttontype] == BUTTON_PRESSED ? 1.0f : 0.0f;
}
}
} // namespace ButtonManager
2 changes: 1 addition & 1 deletion Source/Android/jni/ButtonManager.h
Expand Up @@ -256,4 +256,4 @@ float GetAxisValue(int padID, ButtonType axis);
bool GamepadEvent(const std::string& dev, int button, int action);
void GamepadAxisEvent(const std::string& dev, int axis, float value);
void Shutdown();
}
} // namespace ButtonManager
2 changes: 1 addition & 1 deletion Source/Core/AudioCommon/AudioCommon.h
Expand Up @@ -31,4 +31,4 @@ void StopAudioDump();
void IncreaseVolume(unsigned short offset);
void DecreaseVolume(unsigned short offset);
void ToggleMuteVolume();
}
} // namespace AudioCommon
2 changes: 1 addition & 1 deletion Source/Core/AudioCommon/AudioStretcher.h
Expand Up @@ -25,4 +25,4 @@ class AudioStretcher
double m_stretch_ratio = 1.0;
};

} // AudioCommon
} // namespace AudioCommon
2 changes: 1 addition & 1 deletion Source/Core/AudioCommon/SurroundDecoder.h
Expand Up @@ -33,4 +33,4 @@ class SurroundDecoder
FixedSizeQueue<float, 32768> m_decoded_fifo;
};

} // AudioCommon
} // namespace AudioCommon
2 changes: 1 addition & 1 deletion Source/Core/Common/Arm64Emitter.cpp
Expand Up @@ -4380,4 +4380,4 @@ void ARM64FloatEmitter::MOVI2FDUP(ARM64Reg Rd, float value, ARM64Reg scratch)
DUP(32, Rd, Rd, 0);
}

} // namespace
} // namespace Arm64Gen
2 changes: 1 addition & 1 deletion Source/Core/Common/Arm64Emitter.h
Expand Up @@ -1143,4 +1143,4 @@ class ARM64CodeBlock : public Common::CodeBlock<ARM64XEmitter>
}
}
};
}
} // namespace Arm64Gen
2 changes: 1 addition & 1 deletion Source/Core/Common/Atomic_GCC.h
Expand Up @@ -83,4 +83,4 @@ inline T* AtomicExchangeAcquire(T* volatile& loc, U newval)
{
return __atomic_exchange_n(&loc, newval, __ATOMIC_ACQ_REL);
}
}
} // namespace Common
2 changes: 1 addition & 1 deletion Source/Core/Common/Atomic_Win32.h
Expand Up @@ -91,4 +91,4 @@ inline T* AtomicExchangeAcquire(T* volatile& loc, U newval)
{
return (T*)_InterlockedExchangePointer_acq((void* volatile*)&loc, (void*)newval);
}
}
} // namespace Common
2 changes: 1 addition & 1 deletion Source/Core/Common/BlockingLoop.h
Expand Up @@ -253,4 +253,4 @@ class BlockingLoop
Flag m_may_sleep; // If this is set, we fall back from the busy loop to an event based
// synchronization.
};
}
} // namespace Common
2 changes: 1 addition & 1 deletion Source/Core/Common/Config/ConfigInfo.cpp
Expand Up @@ -32,4 +32,4 @@ bool ConfigLocation::operator<(const ConfigLocation& other) const
const int key_compare = strcasecmp(key.c_str(), other.key.c_str());
return key_compare < 0;
}
}
} // namespace Config
2 changes: 1 addition & 1 deletion Source/Core/Common/Config/ConfigInfo.h
Expand Up @@ -50,4 +50,4 @@ struct ConfigInfo
ConfigLocation location;
T default_value;
};
}
} // namespace Config
2 changes: 1 addition & 1 deletion Source/Core/Common/Config/Enums.h
Expand Up @@ -41,4 +41,4 @@ constexpr std::array<LayerType, 7> SEARCH_ORDER{{
LayerType::GlobalGame,
LayerType::Base,
}};
}
} // namespace Config
2 changes: 1 addition & 1 deletion Source/Core/Common/Config/Layer.cpp
Expand Up @@ -97,4 +97,4 @@ const LayerMap& Layer::GetLayerMap() const
{
return m_map;
}
}
} // namespace Config
4 changes: 2 additions & 2 deletions Source/Core/Common/Config/Layer.h
Expand Up @@ -42,7 +42,7 @@ inline std::optional<std::string> TryParse(const std::string& str_value)
{
return str_value;
}
}
} // namespace detail

template <typename T>
struct ConfigInfo;
Expand Down Expand Up @@ -154,4 +154,4 @@ class Layer
const LayerType m_layer;
std::unique_ptr<ConfigLayerLoader> m_loader;
};
}
} // namespace Config
2 changes: 1 addition & 1 deletion Source/Core/Common/ENetUtil.cpp
Expand Up @@ -36,4 +36,4 @@ int ENET_CALLBACK InterceptCallback(ENetHost* host, ENetEvent* event)
}
return 0;
}
}
} // namespace ENetUtil
2 changes: 1 addition & 1 deletion Source/Core/Common/ENetUtil.h
Expand Up @@ -10,4 +10,4 @@ namespace ENetUtil
{
void WakeupThread(ENetHost* host);
int ENET_CALLBACK InterceptCallback(ENetHost* host, ENetEvent* event);
}
} // namespace ENetUtil
2 changes: 1 addition & 1 deletion Source/Core/Common/FPURoundMode.h
Expand Up @@ -43,4 +43,4 @@ void SetSIMDMode(int rounding_mode, bool non_ieee_mode);
void SaveSIMDState();
void LoadSIMDState();
void LoadDefaultSIMDState();
}
} // namespace FPURoundMode
4 changes: 2 additions & 2 deletions Source/Core/Common/GL/GLInterface/AGL.mm
Expand Up @@ -106,8 +106,8 @@ static bool AttachContextToView(NSOpenGLContext* context, NSView* view, u32* wid

std::unique_ptr<GLContext> GLContextAGL::CreateSharedContext()
{
NSOpenGLContext* new_agl_context =
[[NSOpenGLContext alloc] initWithFormat:m_pixel_format shareContext:m_context];
NSOpenGLContext* new_agl_context = [[NSOpenGLContext alloc] initWithFormat:m_pixel_format
shareContext:m_context];
if (new_agl_context == nil)
{
ERROR_LOG(VIDEO, "failed to create shared context");
Expand Down
2 changes: 1 addition & 1 deletion Source/Core/Common/GekkoDisassembler.cpp
Expand Up @@ -969,7 +969,7 @@ void GekkoDisassembler::mtfsb(u32 in, int n)
}
}

// Paired instructions
// Paired instructions

#define RA ((inst >> 16) & 0x1f)
#define RB ((inst >> 11) & 0x1f)
Expand Down
2 changes: 1 addition & 1 deletion Source/Core/Common/GenericFPURoundMode.cpp
Expand Up @@ -26,4 +26,4 @@ void LoadSIMDState()
void LoadDefaultSIMDState()
{
}
}
} // namespace FPURoundMode
2 changes: 1 addition & 1 deletion Source/Core/Common/JitRegister.cpp
Expand Up @@ -110,4 +110,4 @@ void RegisterV(const void* base_address, u32 code_size, const char* format, va_l
s_perf_map_file.WriteBytes(entry.data(), entry.size());
}
}
}
} // namespace JitRegister
2 changes: 1 addition & 1 deletion Source/Core/Common/JitRegister.h
Expand Up @@ -30,4 +30,4 @@ inline void Register(const void* start, const void* end, const char* format, ...
RegisterV(start, code_size, format, args);
va_end(args);
}
}
} // namespace JitRegister
2 changes: 1 addition & 1 deletion Source/Core/Common/Lazy.h
Expand Up @@ -46,4 +46,4 @@ class Lazy

mutable std::variant<T, std::function<T()>> m_value;
};
}
} // namespace Common
2 changes: 1 addition & 1 deletion Source/Core/Common/Logging/Log.h
Expand Up @@ -72,7 +72,7 @@ enum LOG_LEVELS

static const char LOG_LEVEL_TO_CHAR[7] = "-NEWID";

} // namespace
} // namespace LogTypes

void GenericLog(LogTypes::LOG_LEVELS level, LogTypes::LOG_TYPE type, const char* file, int line,
const char* fmt, ...)
Expand Down
2 changes: 1 addition & 1 deletion Source/Core/Common/MD5.cpp
Expand Up @@ -49,4 +49,4 @@ std::string MD5Sum(const std::string& file_path, std::function<bool(int)> report

return output_string;
}
}
} // namespace MD5
2 changes: 1 addition & 1 deletion Source/Core/Common/Profiler.cpp
Expand Up @@ -161,4 +161,4 @@ std::string Profiler::Read()

return buffer.str();
}
}
} // namespace Common
2 changes: 1 addition & 1 deletion Source/Core/Common/Profiler.h
Expand Up @@ -55,7 +55,7 @@ class ProfilerExecuter
private:
Profiler* m_p;
};
};
}; // namespace Common

// Warning: This profiler isn't thread safe. Only profile functions which doesn't run simultaneously
#define PROFILE(name) \
Expand Down
2 changes: 1 addition & 1 deletion Source/Core/Common/SPSCQueue.h
Expand Up @@ -107,4 +107,4 @@ class SPSCQueue
ElementPtr* m_read_ptr;
std::atomic<u32> m_size;
};
}
} // namespace Common
2 changes: 1 addition & 1 deletion Source/Core/Common/TraversalServer.cpp
Expand Up @@ -112,7 +112,7 @@ struct hash<TraversalHostId>
return p[0] ^ ((p[1] << 13) | (p[1] >> 19));
}
};
}
} // namespace std

static int sock;
static std::unordered_map<TraversalRequestId, OutgoingPacketInfo> outgoingPackets;
Expand Down
2 changes: 1 addition & 1 deletion Source/Core/Common/UPnP.h
Expand Up @@ -12,6 +12,6 @@ namespace UPnP
{
void TryPortmapping(u16 port);
void StopPortmapping();
}
} // namespace UPnP

#endif
2 changes: 1 addition & 1 deletion Source/Core/Common/x64Emitter.cpp
Expand Up @@ -3389,4 +3389,4 @@ void XEmitter::RDTSC()
Write8(0x0F);
Write8(0x31);
}
}
} // namespace Gen
2 changes: 1 addition & 1 deletion Source/Core/Common/x64Emitter.h
Expand Up @@ -1177,4 +1177,4 @@ class X64CodeBlock : public Common::CodeBlock<XEmitter>
}
};

} // namespace
} // namespace Gen
2 changes: 1 addition & 1 deletion Source/Core/Common/x64FPURoundMode.cpp
Expand Up @@ -61,4 +61,4 @@ void LoadDefaultSIMDState()
{
_mm_setcsr(default_sse_state);
}
}
} // namespace FPURoundMode
2 changes: 1 addition & 1 deletion Source/Core/Core/ARDecrypt.h
Expand Up @@ -14,4 +14,4 @@ namespace ActionReplay
{
void DecryptARCode(std::vector<std::string> vCodes, std::vector<AREntry>* ops);

} // namespace
} // namespace ActionReplay
2 changes: 1 addition & 1 deletion Source/Core/Core/ActionReplay.h
Expand Up @@ -48,4 +48,4 @@ void EnableSelfLogging(bool enable);
std::vector<std::string> GetSelfLog();
void ClearSelfLog();
bool IsSelfLogging();
} // namespace
} // namespace ActionReplay
4 changes: 2 additions & 2 deletions Source/Core/Core/ConfigLoaders/BaseConfigLoader.h
Expand Up @@ -10,10 +10,10 @@ namespace Config
{
class ConfigLayerLoader;
enum class LayerType;
}
} // namespace Config

namespace ConfigLoaders
{
void SaveToSYSCONF(Config::LayerType layer);
std::unique_ptr<Config::ConfigLayerLoader> GenerateBaseConfigLoader();
}
} // namespace ConfigLoaders
2 changes: 1 addition & 1 deletion Source/Core/Core/ConfigLoaders/GameConfigLoader.h
Expand Up @@ -25,4 +25,4 @@ std::unique_ptr<Config::ConfigLayerLoader> GenerateGlobalGameConfigLoader(const
u16 revision);
std::unique_ptr<Config::ConfigLayerLoader> GenerateLocalGameConfigLoader(const std::string& id,
u16 revision);
}
} // namespace ConfigLoaders
2 changes: 1 addition & 1 deletion Source/Core/Core/ConfigLoaders/IsSettingSaveable.h
Expand Up @@ -15,4 +15,4 @@ namespace ConfigLoaders
// systems to co-exist without trampling on each other while saving.
// This function shall be removed when the old configuration system retires.
bool IsSettingSaveable(const Config::ConfigLocation& config_location);
} // namespace ConfigLoader
} // namespace ConfigLoaders
2 changes: 1 addition & 1 deletion Source/Core/Core/ConfigLoaders/MovieConfigLoader.h
Expand Up @@ -32,4 +32,4 @@ class MovieConfigLayerLoader final : public Config::ConfigLayerLoader

void SaveToDTM(Movie::DTMHeader* header);
std::unique_ptr<Config::ConfigLayerLoader> GenerateMovieConfigLoader(Movie::DTMHeader* header);
}
} // namespace ConfigLoaders
2 changes: 1 addition & 1 deletion Source/Core/Core/CoreTiming.cpp
Expand Up @@ -442,4 +442,4 @@ void SetFakeTBStartTicks(u64 val)
g.fake_TB_start_ticks = val;
}

} // namespace
} // namespace CoreTiming
2 changes: 1 addition & 1 deletion Source/Core/Core/CoreTiming.h
Expand Up @@ -108,4 +108,4 @@ void SetFakeTBStartTicks(u64 val);

void ForceExceptionCheck(s64 cycles);

} // end of namespace
} // namespace CoreTiming
2 changes: 1 addition & 1 deletion Source/Core/Core/DSP/Interpreter/DSPIntExtOps.cpp
Expand Up @@ -495,7 +495,7 @@ void nop(const UDSPInstruction opc)
}

} // namespace Ext
} // namespace Interpeter
} // namespace Interpreter

// The ext ops are calculated in parallel with the actual op. That means that
// both the main op and the ext op see the same register state as input. The
Expand Down
2 changes: 1 addition & 1 deletion Source/Core/Core/DSP/Interpreter/DSPIntExtOps.h
Expand Up @@ -44,5 +44,5 @@ void nr(UDSPInstruction opc);
void nop(UDSPInstruction opc);

} // namespace Ext
} // namespace Interpeter
} // namespace Interpreter
} // namespace DSP
2 changes: 1 addition & 1 deletion Source/Core/Core/Debugger/Debugger_SymbolMap.cpp
Expand Up @@ -159,4 +159,4 @@ void PrintDataBuffer(LogTypes::LOG_TYPE type, const u8* data, size_t size, const
}
}

} // end of namespace Debugger
} // namespace Dolphin_Debugger
2 changes: 1 addition & 1 deletion Source/Core/Core/Debugger/Debugger_SymbolMap.h
Expand Up @@ -25,4 +25,4 @@ void PrintDataBuffer(LogTypes::LOG_TYPE type, const u8* data, size_t size,
const std::string& title);
void AddAutoBreakpoints();

} // end of namespace Debugger
} // namespace Dolphin_Debugger
2 changes: 1 addition & 1 deletion Source/Core/Core/FifoPlayer/FifoAnalyzer.cpp
Expand Up @@ -290,4 +290,4 @@ void CalculateVertexElementSizes(int sizes[], int vatIndex, const CPMemory& cpMe
vtxDescHex >>= 2;
}
}
}
} // namespace FifoAnalyzer
2 changes: 1 addition & 1 deletion Source/Core/Core/FifoPlayer/FifoAnalyzer.h
Expand Up @@ -38,4 +38,4 @@ void CalculateVertexElementSizes(int sizes[], int vatIndex, const CPMemory& cpMe

extern bool s_DrawingObject;
extern FifoAnalyzer::CPMemory s_CpMem;
}
} // namespace FifoAnalyzer
2 changes: 1 addition & 1 deletion Source/Core/Core/GeckoCodeConfig.cpp
Expand Up @@ -253,4 +253,4 @@ void SaveCodes(IniFile& inifile, const std::vector<GeckoCode>& gcodes)
inifile.SetLines("Gecko", lines);
inifile.SetLines("Gecko_Enabled", enabledLines);
}
}
} // namespace Gecko
2 changes: 1 addition & 1 deletion Source/Core/Core/GeckoCodeConfig.h
Expand Up @@ -15,4 +15,4 @@ namespace Gecko
std::vector<GeckoCode> LoadCodes(const IniFile& globalIni, const IniFile& localIni);
std::vector<GeckoCode> DownloadCodes(std::string gametdb_id, bool* succeeded);
void SaveCodes(IniFile& inifile, const std::vector<GeckoCode>& gcodes);
}
} // namespace Gecko
2 changes: 1 addition & 1 deletion Source/Core/Core/HLE/HLE_Misc.cpp
Expand Up @@ -68,4 +68,4 @@ void GeckoReturnTrampoline()
PowerPC::HostRead_U64(SP + 24 + (2 * i + 1) * sizeof(u64)));
}
}
}
} // namespace HLE_Misc
2 changes: 1 addition & 1 deletion Source/Core/Core/HLE/HLE_Misc.h
Expand Up @@ -10,4 +10,4 @@ void UnimplementedFunction();
void HBReload();
void GeckoCodeHandlerICacheFlush();
void GeckoReturnTrampoline();
}
} // namespace HLE_Misc
2 changes: 1 addition & 1 deletion Source/Core/Core/HLE/HLE_OS.h
Expand Up @@ -14,4 +14,4 @@ void HLE_LogDPrint();
void HLE_LogVDPrint();
void HLE_LogFPrint();
void HLE_LogVFPrint();
}
} // namespace HLE_OS
2 changes: 1 addition & 1 deletion Source/Core/Core/HW/AudioInterface.h
Expand Up @@ -28,4 +28,4 @@ unsigned int GetAIDSampleRate();

void GenerateAISInterrupt();

} // namespace
} // namespace AudioInterface
2 changes: 1 addition & 1 deletion Source/Core/Core/HW/CPU.cpp
Expand Up @@ -328,4 +328,4 @@ bool PauseAndLock(bool do_lock, bool unpause_on_unlock, bool control_adjacent)
}
return was_unpaused;
}
}
} // namespace CPU
2 changes: 1 addition & 1 deletion Source/Core/Core/HW/CPU.h
Expand Up @@ -74,4 +74,4 @@ const State* GetStatePtr();
// "control_adjacent" causes PauseAndLock to behave like EnableStepping by modifying the
// state of the Audio and FIFO subsystems as well.
bool PauseAndLock(bool do_lock, bool unpause_on_unlock = true, bool control_adjacent = false);
}
} // namespace CPU
4 changes: 2 additions & 2 deletions Source/Core/Core/HW/DSPHLE/UCodes/AXVoice.h
Expand Up @@ -460,8 +460,8 @@ void ProcessVoice(PB_TYPE& pb, const AXBuffers& buffers, u16 count, AXMixControl
pb.lpf.yn1 = LowPassFilter(samples, count, pb.lpf.yn1, pb.lpf.a0, pb.lpf.b0);
}

// Mix LRS, AUXA and AUXB depending on mixer_control
// TODO: Handle DPL2 on AUXB.
// Mix LRS, AUXA and AUXB depending on mixer_control
// TODO: Handle DPL2 on AUXB.

#define MIX_ON(C) (0 != (mctrl & MIX_##C))
#define RAMP_ON(C) (0 != (mctrl & MIX_##C##_RAMP))
Expand Down
2 changes: 1 addition & 1 deletion Source/Core/Core/HW/DVD/DVDInterface.h
Expand Up @@ -16,7 +16,7 @@ namespace DiscIO
{
class Volume;
struct Partition;
}
} // namespace DiscIO
namespace MMIO
{
class Mapping;
Expand Down

0 comments on commit 6f6c7e5

Please sign in to comment.