Use functor with overloaded methods instead of overloaded functions to
avoid warning about unused function.
@@ -39,13 +39,21 @@ char Logger::_hostname[1024] = { '\0'};
char Logger::_serviceName[1024] = {'\0' };
ControlFile *Logger::_controlFile = 0;
-static inline unsigned long gettid(const void *tid) {
+namespace {
+
+class GetTid {
+public:
+ unsigned long operator()(const void *tid) const {
return reinterpret_cast<uint64_t>(tid) >> 3;
}
-
-static inline unsigned long gettid(unsigned long tid) {
+ unsigned long operator()(unsigned long tid) const {
return tid;
}
+};
+
+GetTid gettid;
+
+}
void
Logger::ensureControlName()
