From d9fd05680333a71211fcaf2419281e7897e2c26c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Lam?= Date: Mon, 5 Jun 2017 02:29:56 +0200 Subject: [PATCH] Fix minor formatting issues These were not caught by the lint script while it was broken. --- Source/Android/jni/MainAndroid.cpp | 4 ++-- Source/Core/Common/GL/GLInterface/WGL.cpp | 2 +- Source/Core/Core/HW/DVD/DVDInterface.cpp | 22 ++++++++----------- Source/Core/Core/HW/EXI/BBA-TAP/TAP_Win32.h | 2 +- Source/Core/Core/IOS/Network/Socket.cpp | 14 +++++------- Source/Core/DiscIO/CompressedBlob.cpp | 2 +- Source/Core/DiscIO/WiiWad.cpp | 6 ++--- .../Core/DolphinQt2/Config/SettingsWindow.cpp | 1 - .../ControllerInterface/DInput/DInput.h | 2 +- Source/UnitTests/Common/StringUtilTest.cpp | 5 +++-- 10 files changed, 26 insertions(+), 34 deletions(-) diff --git a/Source/Android/jni/MainAndroid.cpp b/Source/Android/jni/MainAndroid.cpp index 819bcba3e5..e16e2bbecc 100644 --- a/Source/Android/jni/MainAndroid.cpp +++ b/Source/Android/jni/MainAndroid.cpp @@ -460,8 +460,8 @@ JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_SetUserDirec JNIEnv* env, jobject obj, jstring jDirectory); JNIEXPORT jstring JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_GetUserDirectory(JNIEnv* env, jobject obj); -JNIEXPORT jint JNICALL -Java_org_dolphinemu_dolphinemu_NativeLibrary_DefaultCPUCore(JNIEnv* env, jobject obj); +JNIEXPORT jint JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_DefaultCPUCore(JNIEnv* env, + jobject obj); JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_SetProfiling(JNIEnv* env, jobject obj, jboolean enable); diff --git a/Source/Core/Common/GL/GLInterface/WGL.cpp b/Source/Core/Common/GL/GLInterface/WGL.cpp index ab51344964..57c46cb42b 100644 --- a/Source/Core/Common/GL/GLInterface/WGL.cpp +++ b/Source/Core/Common/GL/GLInterface/WGL.cpp @@ -2,9 +2,9 @@ // Licensed under GPLv2+ // Refer to the license.txt file included. +#include #include #include -#include #include "Common/GL/GLInterface/WGL.h" #include "Common/Logging/Log.h" diff --git a/Source/Core/Core/HW/DVD/DVDInterface.cpp b/Source/Core/Core/HW/DVD/DVDInterface.cpp index 17c52d8912..198afd1d38 100644 --- a/Source/Core/Core/HW/DVD/DVDInterface.cpp +++ b/Source/Core/Core/HW/DVD/DVDInterface.cpp @@ -313,9 +313,8 @@ static u32 AdvanceDTK(u32 maximum_samples, u32* samples_to_process) { if (s_audio_position >= s_current_start + s_current_length) { - DEBUG_LOG(DVDINTERFACE, - "AdvanceDTK: NextStart=%08" PRIx64 ", NextLength=%08x, " - "CurrentStart=%08" PRIx64 ", CurrentLength=%08x, AudioPos=%08" PRIx64, + DEBUG_LOG(DVDINTERFACE, "AdvanceDTK: NextStart=%08" PRIx64 ", NextLength=%08x, " + "CurrentStart=%08" PRIx64 ", CurrentLength=%08x, AudioPos=%08" PRIx64, s_next_start, s_next_length, s_current_start, s_current_length, s_audio_position); s_audio_position = s_next_start; @@ -834,9 +833,8 @@ void ExecuteCommand(u32 command_0, u32 command_1, u32 command_2, u32 output_addr { u64 iDVDOffset = (u64)command_1 << 2; - INFO_LOG(DVDINTERFACE, - "Read: DVDOffset=%08" PRIx64 - ", DMABuffer = %08x, SrcLength = %08x, DMALength = %08x", + INFO_LOG(DVDINTERFACE, "Read: DVDOffset=%08" PRIx64 + ", DMABuffer = %08x, SrcLength = %08x, DMALength = %08x", iDVDOffset, output_address, command_2, output_length); command_handled_by_thread = @@ -958,10 +956,9 @@ void ExecuteCommand(u32 command_0, u32 command_1, u32 command_2, u32 output_addr switch (command_0 >> 16 & 0xFF) { case 0x00: // Returns streaming status - INFO_LOG(DVDINTERFACE, - "(Audio): Stream Status: Request Audio status " - "AudioPos:%08" PRIx64 "/%08" PRIx64 " " - "CurrentStart:%08" PRIx64 " CurrentLength:%08x", + INFO_LOG(DVDINTERFACE, "(Audio): Stream Status: Request Audio status " + "AudioPos:%08" PRIx64 "/%08" PRIx64 " " + "CurrentStart:%08" PRIx64 " CurrentLength:%08x", s_audio_position, s_current_start + s_current_length, s_current_start, s_current_length); WriteImmediate(s_stream ? 1 : 0, output_address, reply_to_ios); @@ -1305,9 +1302,8 @@ void ScheduleReads(u64 offset, u32 length, const DiscIO::Partition& partition, u s_read_buffer_end_offset - s_read_buffer_start_offset, wii_disc)); } - DEBUG_LOG(DVDINTERFACE, - "Schedule reads: ECC blocks unbuffered=%d, buffered=%d, " - "ticks=%" PRId64 ", time=%" PRId64 " us", + DEBUG_LOG(DVDINTERFACE, "Schedule reads: ECC blocks unbuffered=%d, buffered=%d, " + "ticks=%" PRId64 ", time=%" PRId64 " us", unbuffered_blocks, buffered_blocks, ticks_until_completion, ticks_until_completion * 1000000 / SystemTimers::GetTicksPerSecond()); } diff --git a/Source/Core/Core/HW/EXI/BBA-TAP/TAP_Win32.h b/Source/Core/Core/HW/EXI/BBA-TAP/TAP_Win32.h index 6cabb27f7a..b87030f026 100644 --- a/Source/Core/Core/HW/EXI/BBA-TAP/TAP_Win32.h +++ b/Source/Core/Core/HW/EXI/BBA-TAP/TAP_Win32.h @@ -31,8 +31,8 @@ // the TAP-Win32 driver and contains definitions // common to both. //=============================================== -#include #include +#include #include #define TAP_WIN32_MIN_MAJOR 9 #define TAP_WIN32_MIN_MINOR 0 diff --git a/Source/Core/Core/IOS/Network/Socket.cpp b/Source/Core/Core/IOS/Network/Socket.cpp index 02ea7126d4..b5968568a1 100644 --- a/Source/Core/Core/IOS/Network/Socket.cpp +++ b/Source/Core/Core/IOS/Network/Socket.cpp @@ -390,10 +390,9 @@ void WiiSocket::Update(bool read, bool write, bool except) } } - INFO_LOG(IOS_SSL, - "IOCTLV_NET_SSL_DOHANDSHAKE = (%d) " - "BufferIn: (%08x, %i), BufferIn2: (%08x, %i), " - "BufferOut: (%08x, %i), BufferOut2: (%08x, %i)", + INFO_LOG(IOS_SSL, "IOCTLV_NET_SSL_DOHANDSHAKE = (%d) " + "BufferIn: (%08x, %i), BufferIn2: (%08x, %i), " + "BufferOut: (%08x, %i), BufferOut2: (%08x, %i)", ret, BufferIn, BufferInSize, BufferIn2, BufferInSize2, BufferOut, BufferOutSize, BufferOut2, BufferOutSize2); break; @@ -558,10 +557,9 @@ void WiiSocket::Update(bool read, bool write, bool except) ReturnValue = WiiSockMan::GetNetErrorCode(ret, BufferOutSize2 ? "SO_RECVFROM" : "SO_RECV", true); - INFO_LOG(IOS_NET, - "%s(%d, %p) Socket: %08X, Flags: %08X, " - "BufferIn: (%08x, %i), BufferIn2: (%08x, %i), " - "BufferOut: (%08x, %i), BufferOut2: (%08x, %i)", + INFO_LOG(IOS_NET, "%s(%d, %p) Socket: %08X, Flags: %08X, " + "BufferIn: (%08x, %i), BufferIn2: (%08x, %i), " + "BufferOut: (%08x, %i), BufferOut2: (%08x, %i)", BufferOutSize2 ? "IOCTLV_SO_RECVFROM " : "IOCTLV_SO_RECV ", ReturnValue, data, wii_fd, flags, BufferIn, BufferInSize, BufferIn2, BufferInSize2, BufferOut, BufferOutSize, BufferOut2, BufferOutSize2); diff --git a/Source/Core/DiscIO/CompressedBlob.cpp b/Source/Core/DiscIO/CompressedBlob.cpp index 7c89121278..e96d0160a5 100644 --- a/Source/Core/DiscIO/CompressedBlob.cpp +++ b/Source/Core/DiscIO/CompressedBlob.cpp @@ -3,8 +3,8 @@ // Refer to the license.txt file included. #ifdef _WIN32 -#include #include +#include #endif #include diff --git a/Source/Core/DiscIO/WiiWad.cpp b/Source/Core/DiscIO/WiiWad.cpp index 06d8d57070..8558a73810 100644 --- a/Source/Core/DiscIO/WiiWad.cpp +++ b/Source/Core/DiscIO/WiiWad.cpp @@ -72,10 +72,8 @@ bool WiiWAD::ParseWAD() u32 footer_size; if (!m_reader->ReadSwapped(0x08, &certificate_chain_size) || - !m_reader->ReadSwapped(0x0C, &reserved) || - !m_reader->ReadSwapped(0x10, &ticket_size) || - !m_reader->ReadSwapped(0x14, &tmd_size) || - !m_reader->ReadSwapped(0x18, &data_app_size) || + !m_reader->ReadSwapped(0x0C, &reserved) || !m_reader->ReadSwapped(0x10, &ticket_size) || + !m_reader->ReadSwapped(0x14, &tmd_size) || !m_reader->ReadSwapped(0x18, &data_app_size) || !m_reader->ReadSwapped(0x1C, &footer_size)) return false; diff --git a/Source/Core/DolphinQt2/Config/SettingsWindow.cpp b/Source/Core/DolphinQt2/Config/SettingsWindow.cpp index 63d29e4255..fb1a8190fe 100644 --- a/Source/Core/DolphinQt2/Config/SettingsWindow.cpp +++ b/Source/Core/DolphinQt2/Config/SettingsWindow.cpp @@ -7,7 +7,6 @@ #include "DolphinQt2/Settings/GeneralPane.h" #include "DolphinQt2/Settings/InterfacePane.h" - SettingsWindow::SettingsWindow(QWidget* parent) : QDialog(parent) { // Set Window Properties diff --git a/Source/Core/InputCommon/ControllerInterface/DInput/DInput.h b/Source/Core/InputCommon/ControllerInterface/DInput/DInput.h index 951eabebb9..d9b0bdc0a9 100644 --- a/Source/Core/InputCommon/ControllerInterface/DInput/DInput.h +++ b/Source/Core/InputCommon/ControllerInterface/DInput/DInput.h @@ -6,8 +6,8 @@ #define DINPUT_SOURCE_NAME "DInput" -#include #include +#include #include "InputCommon/ControllerInterface/DInput/DInput8.h" diff --git a/Source/UnitTests/Common/StringUtilTest.cpp b/Source/UnitTests/Common/StringUtilTest.cpp index a0da5e672a..36e1ba9812 100644 --- a/Source/UnitTests/Common/StringUtilTest.cpp +++ b/Source/UnitTests/Common/StringUtilTest.cpp @@ -43,9 +43,10 @@ TEST(StringUtil, StringEndsWith) TEST(StringUtil, UTF8ToSHIFTJIS) { - const std::string kirby_unicode = "\xe6\x98\x9f\xe3\x81\xae\xe3\x82\xab\xe3\x83\xbc\xe3\x83\x93\xe3\x82\xa3"; + const std::string kirby_unicode = + "\xe6\x98\x9f\xe3\x81\xae\xe3\x82\xab\xe3\x83\xbc\xe3\x83\x93\xe3\x82\xa3"; const std::string kirby_sjis = "\x90\xaf\x82\xcc\x83\x4a\x81\x5b\x83\x72\x83\x42"; - + EXPECT_STREQ(SHIFTJISToUTF8(UTF8ToSHIFTJIS(kirby_unicode)).c_str(), kirby_unicode.c_str()); EXPECT_STREQ(UTF8ToSHIFTJIS(kirby_unicode).c_str(), kirby_sjis.c_str()); }