replace exit and _exit with std variants

_exit and std::_Exit are identical, expect the latter is standard C++.

Added several functions to the std namespace as a result of headers.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
Rosen Penev
2020-03-26 18:44:09 -07:00
parent cfa4524cb3
commit 3540cf26b1
4 changed files with 20 additions and 27 deletions

View File

@@ -66,9 +66,6 @@
#include "archive/ArchivePlugin.hxx"
#endif
#include <stdio.h>
#include <stdlib.h>
namespace {
#ifdef _WIN32
constexpr auto CONFIG_FILE_LOCATION = Path::FromFS(PATH_LITERAL("mpd\\mpd.conf"));
@@ -256,7 +253,7 @@ static void version()
#endif
"\n");
exit(EXIT_SUCCESS);
std::exit(EXIT_SUCCESS);
}
static void PrintOption(const OptionDef &opt)
@@ -286,7 +283,7 @@ static void help()
if(i.HasDescription()) // hide hidden options from help print
PrintOption(i);
exit(EXIT_SUCCESS);
std::exit(EXIT_SUCCESS);
}
class ConfigLoader