Browse Source

修改version的定义位置, 加速编译速度

master
zhaohe 2 weeks ago
parent
commit
1291cd4cec
  1. 3
      sdk/components/api/zi_module.hpp
  2. 4
      usrc/version.c
  3. 10
      usrc/version.h

3
sdk/components/api/zi_module.hpp

@ -4,6 +4,7 @@
#include <functional>
#include "a8000_protocol\protocol.hpp"
#include "version.h"
namespace iflytop {
using namespace std;
@ -69,7 +70,7 @@ class ZIModule {
virtual ~ZIModule() {}
ZIModule(int32_t type) {
module_type = type;
module_version = get_app_version();
module_version = ::get_app_version();
}
public:

4
usrc/version.c

@ -2,6 +2,4 @@
int32_t APP_VERSION = 1214;
int32_t get_app_version(){
return APP_VERSION;
}
int32_t get_app_version() { return APP_VERSION; }

10
usrc/version.h

@ -1,4 +1,12 @@
#pragma once
#ifdef __cplusplus
extern "C" {
#endif
#include <stdint.h>
int32_t get_app_version();
#ifdef __cplusplus
}
#endif
int32_t get_app_version();
Loading…
Cancel
Save