mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-22 13:16:23 +00:00
chore(Core/Worldserver): restyle worldserver lib with astyle (#3463)
This commit is contained in:
@@ -70,9 +70,9 @@ char** cli_completion(const char* text, int start, int /*end*/)
|
||||
|
||||
int cli_hook_func()
|
||||
{
|
||||
if (World::IsStopped())
|
||||
rl_done = 1;
|
||||
return 0;
|
||||
if (World::IsStopped())
|
||||
rl_done = 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -81,18 +81,18 @@ void utf8print(void* /*arg*/, const char* str)
|
||||
{
|
||||
#if AC_PLATFORM == AC_PLATFORM_WINDOWS
|
||||
wchar_t wtemp_buf[6000];
|
||||
size_t wtemp_len = 6000-1;
|
||||
size_t wtemp_len = 6000 - 1;
|
||||
if (!Utf8toWStr(str, strlen(str), wtemp_buf, wtemp_len))
|
||||
return;
|
||||
|
||||
char temp_buf[6000];
|
||||
CharToOemBuffW(&wtemp_buf[0], &temp_buf[0], wtemp_len+1);
|
||||
CharToOemBuffW(&wtemp_buf[0], &temp_buf[0], wtemp_len + 1);
|
||||
printf(temp_buf);
|
||||
#else
|
||||
{
|
||||
printf("%s", str);
|
||||
fflush(stdout);
|
||||
}
|
||||
{
|
||||
printf("%s", str);
|
||||
fflush(stdout);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -112,7 +112,7 @@ int kb_hit_return()
|
||||
tv.tv_usec = 0;
|
||||
FD_ZERO(&fds);
|
||||
FD_SET(STDIN_FILENO, &fds);
|
||||
select(STDIN_FILENO+1, &fds, nullptr, nullptr, &tv);
|
||||
select(STDIN_FILENO + 1, &fds, nullptr, nullptr, &tv);
|
||||
return FD_ISSET(STDIN_FILENO, &fds);
|
||||
}
|
||||
#endif
|
||||
@@ -139,7 +139,7 @@ void CliRunnable::run()
|
||||
{
|
||||
fflush(stdout);
|
||||
|
||||
char *command_str ; // = fgets(commandbuf, sizeof(commandbuf), stdin);
|
||||
char* command_str ; // = fgets(commandbuf, sizeof(commandbuf), stdin);
|
||||
|
||||
#if AC_PLATFORM == AC_PLATFORM_WINDOWS
|
||||
char commandbuf[256];
|
||||
@@ -151,7 +151,7 @@ void CliRunnable::run()
|
||||
|
||||
if (command_str != nullptr)
|
||||
{
|
||||
for (int x=0; command_str[x]; ++x)
|
||||
for (int x = 0; command_str[x]; ++x)
|
||||
if (command_str[x] == '\r' || command_str[x] == '\n')
|
||||
{
|
||||
command_str[x] = 0;
|
||||
|
||||
Reference in New Issue
Block a user