Do not do using namespace std
to avoid type conflict
#681
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.
The STL now defines
std::byte
so doingusing namespace std
will conflict will custom definition ofbyte
, which this legacy code is full of.It looks like NetRadiant went the route of making explicit usage of
std::
prefixed types and did not renamed the custom definition of byte, so doing the same reduces diff noise between the two trees.This also makes the code future proof if the STL decides to define some other types with common name.
This patches replaces all usages of
map
,pair
andvector
withstd::map
,std::pair
andstd::vector
and removes theusing namespace std
line instl_check.h
.