From 7528986e4449febead9b18b6118f0b096f7cf800 Mon Sep 17 00:00:00 2001 From: Loïc Blot Date: Sat, 19 Aug 2017 14:25:35 +0200 Subject: Code modernization: src/p*, src/q*, src/r*, src/s* (partial) (#6282) * Code modernization: src/p*, src/q*, src/r*, src/s* (partial) * empty function * default constructor/destructor * for range-based loops * use emplace_back instead of push_back * C++ STL header style * Spelling: vertice -> vertex --- src/porting.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/porting.cpp') diff --git a/src/porting.cpp b/src/porting.cpp index b453b7f76..04a7952c6 100644 --- a/src/porting.cpp +++ b/src/porting.cpp @@ -59,7 +59,7 @@ namespace porting bool g_killed = false; -bool * signal_handler_killstatus(void) +bool *signal_handler_killstatus() { return &g_killed; } @@ -167,7 +167,7 @@ bool detectMSVCBuildDir(const std::string &path) "bin\\Build", NULL }; - return (removeStringEnd(path, ends) != ""); + return (!removeStringEnd(path, ends).empty()); } std::string get_sysinfo() @@ -388,7 +388,7 @@ bool setSystemPaths() // It is identified by containing the subdirectory "builtin". std::list trylist; std::string static_sharedir = STATIC_SHAREDIR; - if (static_sharedir != "" && static_sharedir != ".") + if (!static_sharedir.empty() && static_sharedir != ".") trylist.push_back(static_sharedir); trylist.push_back(bindir + DIR_DELIM ".." DIR_DELIM "share" @@ -623,7 +623,7 @@ bool secure_rand_fill_buf(void *buf, size_t len) #endif -void attachOrCreateConsole(void) +void attachOrCreateConsole() { #ifdef _WIN32 static bool consoleAllocated = false; -- cgit v1.2.3