]> granicus.if.org Git - icinga2/commitdiff
Clean up the IsAbsolutePath patch
authorGunnar Beutner <gunnar.beutner@icinga.com>
Thu, 27 Apr 2017 03:31:44 +0000 (05:31 +0200)
committerGunnar Beutner <gunnar.beutner@icinga.com>
Thu, 27 Apr 2017 03:31:44 +0000 (05:31 +0200)
refs #5168

lib/config/configcompiler.cpp
lib/config/configcompiler.hpp

index 6b5f3a3caecb17847dad58f029cfe00fa4ddeba3..1f56306c15e289643e47562d67c6010d0644150c 100644 (file)
@@ -27,7 +27,7 @@
 #include <fstream>
 
 #ifdef _WIN32
-#include "Shlwapi.h"
+#      include <shlwapi.h>
 #endif /* _WIN32 */
 
 using namespace icinga;
@@ -354,3 +354,14 @@ bool ConfigCompiler::HasZoneConfigAuthority(const String& zoneName)
 
        return !empty;
 }
+
+
+bool ConfigCompiler::IsAbsolutePath(const String& path)
+{
+#ifndef _WIN32
+       return (path.GetLength() > 0 && path[0] == '/');
+#else /* _WIN32 */
+       return !PathIsRelative(path.CStr());
+#endif /* _WIN32 */
+}
+
index 472fa2330b0fa1250394bd0686293bb4188e0ef0..94ae967bdcdec1619889efc8b77ce82606d3474d 100644 (file)
@@ -127,14 +127,6 @@ public:
 
        static bool HasZoneConfigAuthority(const String& zoneName);
 
-       static inline bool IsAbsolutePath(const String& path) {
-#ifndef _WIN32
-               return (path.GetLength() > 0 && path[0] == '/');
-#else
-               return !PathIsRelative(path.CStr());
-#endif /* _WIN32 */
-       }
-
 private:
        boost::promise<boost::shared_ptr<Expression> > m_Promise;
 
@@ -154,6 +146,8 @@ private:
 
        static void HandleIncludeZone(const String& relativeBase, const String& tag, const String& path, const String& pattern, const String& package, std::vector<Expression *>& expressions);
 
+       static bool IsAbsolutePath(const String& path);
+
 public:
        bool m_Eof;
        int m_OpenBraces;