binpac: Separate declaration of binpac::init from definition.

When friend'ing a global function via qualified-id, Clang complains if
it's not been previously declared.
This commit is contained in:
Jon Siwek 2014-11-03 10:05:17 -06:00 committed by Tim Wojtulewicz
parent 434f147932
commit db1c70b32e

View file

@ -9,6 +9,12 @@ class RE_Matcher;
namespace binpac namespace binpac
{ {
// Must be called before any binpac functionality is used.
//
// Note, this must be declared/defined here, and inline, because the RE
// functionality can only be used when compiling from inside Bro.
inline void init();
// Internal vector recording not yet compiled matchers. // Internal vector recording not yet compiled matchers.
extern std::vector<RE_Matcher*>* uncompiled_re_matchers; extern std::vector<RE_Matcher*>* uncompiled_re_matchers;
@ -62,10 +68,6 @@ inline void RegExMatcher::init()
uncompiled_re_matchers->clear(); uncompiled_re_matchers->clear();
} }
// Must be called before any binpac functionality is used.
//
// Note, this must be defined here, and inline, because the RE functionality
// can only be used when compiling from inside Bro.
inline void init() inline void init()
{ {
RegExMatcher::init(); RegExMatcher::init();