Browse Source

refactor & fix: 修复WSL编译的问题

SongZihuan 3 years ago
parent
commit
4ad4193ca0
6 changed files with 12 additions and 7 deletions
  1. 6 0
      include/core/activity.hpp
  2. 1 1
      include/tool/dlc.hpp
  3. 0 1
      include/tool/log.hpp
  4. 4 4
      include/tool/tool.hpp
  5. 1 0
      src/core/activity.cpp
  6. 0 1
      src/tool/log.cpp

+ 6 - 0
include/core/activity.hpp

@@ -0,0 +1,6 @@
+#ifndef AFUN_ACTIVITY_HPP
+#define AFUN_ACTIVITY_HPP
+#include "tool.hpp"
+#include "aFunCoreExport.h"
+
+#endif //AFUN_ACTIVITY_HPP

+ 1 - 1
include/tool/dlc.hpp

@@ -106,7 +106,7 @@ namespace aFuntool {
                 dlc--;
         }
 
-        SYMBOL *getSymbol() const {
+        const SYMBOL *getSymbol() const {
             return symbol;
         }
     };

+ 0 - 1
include/tool/log.hpp

@@ -5,7 +5,6 @@
 #include "aFunToolExport.h"
 #include "macro.hpp"
 #include "log-m.hpp"
-#include "iostream"
 
 using namespace aFuntool;
 

+ 4 - 4
include/tool/tool.hpp

@@ -34,6 +34,10 @@ namespace aFuntool {
     };
 }
 
+#include "pthread.h"
+#include "fflags.h"
+#include "aFun_ht.h"
+
 #include "mem.hpp"
 
 #include "stdio_.hpp"
@@ -49,8 +53,4 @@ namespace aFuntool {
 #include "time_.hpp"
 #include "log.hpp"
 
-#include "pthread.h"
-#include "fflags.h"
-#include "aFun_ht.h"
-
 #endif //AFUN_TOOL_HPP

+ 1 - 0
src/core/activity.cpp

@@ -0,0 +1 @@
+#include "activity.hpp"

+ 0 - 1
src/tool/log.cpp

@@ -66,7 +66,6 @@ aFuntool::LogFactory::LogFactory() : sys_log("SYSTEM", log_info) {  // NOLINT co
     csv = nullptr;
 
     asyn=false;
-    pt = 0;
     pthread_cond_init(&cond, nullptr);
     log_buf = nullptr;
     plog_buf = nullptr;