Remove namespace imports as they pollute namespace and are prone to symbol clashes. Backport univalue to latest version, which also includes namespace removals.
Details
- Reviewers
deadalnix - Group Reviewers
Restricted Owners Package (Owns No Changed Paths) Restricted Project - Maniphest Tasks
- Restricted Maniphest Task
- Commits
- rSTAGING41abbec5fd78: Get rid of namespace imports & backporting univalue
rABC41abbec5fd78: Get rid of namespace imports & backporting univalue
These changes build. No new tests should be necessary.
Diff Detail
- Repository
- rABC Bitcoin ABC
- Branch
- namespace
- Lint
Lint Passed Severity Location Code Message Auto-Fix src/univalue/include/univalue.h:1 CFMT Code style violation Auto-Fix src/univalue/lib/univalue.cpp:1 CFMT Code style violation Auto-Fix src/univalue/lib/univalue_get.cpp:1 CFMT Code style violation Auto-Fix src/univalue/lib/univalue_read.cpp:1 CFMT Code style violation Auto-Fix src/univalue/lib/univalue_utffilter.h:1 CFMT Code style violation Auto-Fix src/univalue/lib/univalue_write.cpp:1 CFMT Code style violation Auto-Fix src/univalue/test/no_nul.cpp:1 CFMT Code style violation Auto-Fix src/univalue/test/object.cpp:1 CFMT Code style violation Auto-Fix src/univalue/test/test_json.cpp:1 CFMT Code style violation Auto-Fix src/univalue/test/unitester.cpp:1 CFMT Code style violation - Unit
No Test Coverage - Build Status
Buildable 1158 Build 1158: arc lint + arc unit
Event Timeline
I also noticed one last 'using namespace' in /test/streams_tests.cpp::13
using namespace boost::assign; // bring 'operator+=()' into scope
However, this one makes sense as the alternative is to bring the namespace into scope in every function that it's needed. Something like what is suggested here: https://stackoverflow.com/questions/4892662/is-there-a-way-to-use-boostassign-operators-without-polluting-namespace I could understand this if it was used once, but considering that it's used throughout the file, I think it's ok to leave this one alone. Thoughts?
univalue is a imported codebase, we don't want ot mess with it. If you want to change it, direct this to the univalue devs and then backport here.
Please update the diff title and description to match the actual content. Except that, it's all good.