Format the code via clang-format

This commit is contained in:
Maschell
2022-02-04 16:25:44 +01:00
parent c21f9d8567
commit 2547c7edca
75 changed files with 637 additions and 554 deletions

View File

@@ -23,14 +23,14 @@
*
* for WiiXplorer 2010
***************************************************************************/
#include <vector>
#include <string>
#include <cstdarg>
#include <cstdio>
#include <cstdlib>
#include <string.h>
#include <wut_types.h>
#include <cstdio>
#include <string>
#include <utils/StringTools.h>
#include <vector>
#include <wut_types.h>
BOOL StringTools::EndsWith(const std::string &a, const std::string &b) {
@@ -82,7 +82,7 @@ const wchar_t *StringTools::wfmt(const char *format, ...) {
static char tmp[512];
static wchar_t strWChar[512];
strWChar[0] = 0;
tmp[0] = 0;
tmp[0] = 0;
if (!format)
return (const wchar_t *) strWChar;
@@ -95,7 +95,7 @@ const wchar_t *StringTools::wfmt(const char *format, ...) {
if ((vsprintf(tmp, format, va) >= 0)) {
int bt;
int32_t strlength = strlen(tmp);
bt = mbstowcs(strWChar, tmp, (strlength < 512) ? strlength : 512);
bt = mbstowcs(strWChar, tmp, (strlength < 512) ? strlength : 512);
if (bt > 0) {
strWChar[bt] = 0;
@@ -109,13 +109,13 @@ const wchar_t *StringTools::wfmt(const char *format, ...) {
int32_t StringTools::strprintf(std::string &str, const char *format, ...) {
static char tmp[512];
tmp[0] = 0;
tmp[0] = 0;
int32_t result = 0;
va_list va;
va_start(va, format);
if ((vsprintf(tmp, format, va) >= 0)) {
str = tmp;
str = tmp;
result = str.size();
}
va_end(va);