mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-19 03:45:43 +00:00
refactor(Core/Common): code cleanup (part 12) (#7520)
This commit is contained in:
@@ -182,21 +182,21 @@ namespace Acore
|
||||
|
||||
return CreateChildProcess([&](child& c) -> int
|
||||
{
|
||||
int result;
|
||||
int exitCode;
|
||||
my_child = std::reference_wrapper<child>(c);
|
||||
|
||||
try
|
||||
{
|
||||
c.wait();
|
||||
result = c.exit_code();
|
||||
exitCode = c.exit_code();
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
result = EXIT_FAILURE;
|
||||
exitCode = EXIT_FAILURE;
|
||||
}
|
||||
|
||||
my_child.reset();
|
||||
return was_terminated ? EXIT_FAILURE : result;
|
||||
return was_terminated ? EXIT_FAILURE : exitCode;
|
||||
|
||||
}, executable, args, logger, input_file, is_secure);
|
||||
}
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
#include "Common.h"
|
||||
#include "Containers.h"
|
||||
#include "IpAddress.h"
|
||||
#include "StringConvert.h"
|
||||
#include "StringFormat.h"
|
||||
#include <algorithm>
|
||||
#include <cctype>
|
||||
@@ -17,9 +16,6 @@
|
||||
#include <iomanip>
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <cctype>
|
||||
#include <cstdarg>
|
||||
#include <ctime>
|
||||
#include <utf8.h>
|
||||
|
||||
Tokenizer::Tokenizer(const std::string& src, const char sep, uint32 vectorReserve)
|
||||
@@ -518,7 +514,7 @@ std::wstring GetMainPartOfName(std::wstring const& wname, uint32 declension)
|
||||
{
|
||||
std::wstring const& ending = **itr;
|
||||
std::size_t const endLen = ending.length();
|
||||
if (!(endLen <= thisLen))
|
||||
if (endLen > thisLen)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user