Remove the flag BASE
from string_utilities.h
#837
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
For some reasons the file
string_utilities.h
was meant to be used both as a header and as a c++ source file. The flagBASE
had to be defined when the source code of the functions was to be compiled. Otherwise, whenBASE
was not defined, only the function signatures were used as if the file was a "pure" header file. This was like so since the filestring_utilities.h
had been included in JSBSim in June 2009.This PR is meant to remove this unusual process:
string_utilities
is split into a pair of.h
and.cpp
files just like the rest of the code base.string_utilities.h
string_utilities.cpp
BASE
is removed from the code base.string_utilities.h
are prepended byJSBSIM_API
to allow calling them in unit tests while JSBSim is compiled as a DLL.JSBSim
namespace to avoid name collisions with other libraries.