diff --git a/src/Airports/GenAirports/debug.cxx b/src/Airports/GenAirports/debug.cxx index 850d391a..3618c924 100644 --- a/src/Airports/GenAirports/debug.cxx +++ b/src/Airports/GenAirports/debug.cxx @@ -1,9 +1,12 @@ #include <ctime> + #include "debug.hxx" + std::map<long, std::string> thread_prefix_map; -void DebugRegisterPrefix( const std::string& prefix ) { +void DebugRegisterPrefix(const std::string& prefix) +{ thread_prefix_map[SGThread::current()] = prefix; } @@ -13,7 +16,7 @@ std::string DebugTimeToString(time_t& tt) strncpy(buf, ctime(&tt), 255); buf[255] = '\0'; - buf[strlen(buf)-1]='\0'; + buf[strlen(buf) - 1] = '\0'; - return std::string( buf ); + return std::string(buf); } diff --git a/src/Airports/GenAirports/debug.hxx b/src/Airports/GenAirports/debug.hxx index 9a6b455a..bcf78c70 100644 --- a/src/Airports/GenAirports/debug.hxx +++ b/src/Airports/GenAirports/debug.hxx @@ -1,22 +1,22 @@ #pragma once +#include <cstring> #include <map> #include <string> -#include <cstring> #include <vector> -#include <simgear/threads/SGThread.hxx> #include <simgear/debug/logstream.hxx> +#include <simgear/threads/SGThread.hxx> /* a debug map maps ICAOs to a vector of indexes we want to debug */ -typedef std::map<std::string, std::vector<int>, std::less<std::string> > debug_map; +typedef std::map<std::string, std::vector<int>, std::less<std::string>> debug_map; typedef debug_map::iterator debug_map_iterator; typedef debug_map::const_iterator debug_map_const_iterator; /* This map maps thread IDs to ICAO prefixes */ extern std::map<long, std::string> thread_prefix_map; -extern void DebugRegisterPrefix( const std::string& prefix ); +extern void DebugRegisterPrefix(const std::string& prefix); extern std::string DebugTimeToString(time_t& tt); #define TG_LOG(C,P,M) do { \