diff --git a/src/scope_info.cpp b/src/scope_info.cpp index c6d80fe475..48350f16a7 100644 --- a/src/scope_info.cpp +++ b/src/scope_info.cpp @@ -40,6 +40,8 @@ int WriteScopeLog(char *buf, const char *last) return b - buf; } +#endif + // helper functions const char *scope_dumper::CompanyInfo(int company_id) { @@ -106,5 +108,3 @@ const char *scope_dumper::StationInfo(const BaseStation *st) } return this->buffer; } - -#endif diff --git a/src/scope_info.h b/src/scope_info.h index 4cc772ff1d..a908804c74 100644 --- a/src/scope_info.h +++ b/src/scope_info.h @@ -12,13 +12,14 @@ #ifndef SCOPE_INFO_H #define SCOPE_INFO_H -#ifdef USE_SCOPE_INFO #include #include struct Vehicle; struct BaseStation; +#ifdef USE_SCOPE_INFO + extern std::vector> _scope_stack; struct scope_info_func_obj { @@ -52,6 +53,12 @@ int WriteScopeLog(char *buf, const char *last); return SCOPE_INFO_PASTE(_sc_lm_, __LINE__) (buf, last); \ }); +#else /* USE_SCOPE_INFO */ + +#define SCOPE_INFO_FMT(...) { } + +#endif /* USE_SCOPE_INFO */ + /** * This is a set of helper functions to print useful info from within a SCOPE_INFO_FMT statement. * The use of a struct is so that when used as an argument to SCOPE_INFO_FMT/seprintf/etc, the buffer lives @@ -68,10 +75,4 @@ private: char buffer[256]; }; -#else /* USE_SCOPE_INFO */ - -#define SCOPE_INFO_FMT(...) { } - -#endif /* USE_SCOPE_INFO */ - #endif /* SCOPE_INFO_H */