Skip to content

Commit 06fa42b

Browse files
committed
defqueue.hh: eliminate warnings reported by clang-8.0.0
In file included from cslinker.cc:22: defqueue.hh:58:19: warning: 'const' qualifier on reference type 'TDefByChecker::const_reference' (aka 'const std::pair<const std::__cxx11::basic_string<char>, std::map<std::__cxx11::basic_string<char>, std::__cxx11::list<Defect, std::allocator<Defect> >, std::less<std::__cxx11::basic_string<char> >, std::allocator<std::pair<const std::__cxx11::basic_string<char>, std::__cxx11::list<Defect, std::allocator<Defect> > > > > > &') has no effect [-Wignored-qualifiers] BOOST_FOREACH(const TDefByChecker::const_reference iRow, stor_) ^~~~~~ /usr/include/boost/foreach.hpp:1107:14: note: expanded from macro 'BOOST_FOREACH' for (VAR = BOOST_FOREACH_DEREF(COL); !BOOST_FOREACH_ID(_foreach_continue); BOOST_FOREACH_ID(_foreach_continue) = true) ^ In file included from cslinker.cc:22: defqueue.hh:59:23: warning: 'const' qualifier on reference type 'TDefByFile::const_reference' (aka 'const std::pair<const std::__cxx11::basic_string<char>, std::__cxx11::list<Defect, std::allocator<Defect> > > &') has no effect [-Wignored-qualifiers] BOOST_FOREACH(const TDefByFile::const_reference iCol, iRow.second) ^~~~~~ /usr/include/boost/foreach.hpp:1107:14: note: expanded from macro 'BOOST_FOREACH' for (VAR = BOOST_FOREACH_DEREF(COL); !BOOST_FOREACH_ID(_foreach_continue); BOOST_FOREACH_ID(_foreach_continue) = true) ^ 2 warnings generated. Closes: https://github.com/kdudka/csdiff/pull/10
1 parent 5ab0083 commit 06fa42b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

defqueue.hh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ class DefQueue {
5555
};
5656

5757
template <class TVisitor> bool DefQueue::walk(TVisitor &visitor) {
58-
BOOST_FOREACH(const TDefByChecker::const_reference iRow, stor_)
59-
BOOST_FOREACH(const TDefByFile::const_reference iCol, iRow.second)
58+
BOOST_FOREACH(TDefByChecker::const_reference iRow, stor_)
59+
BOOST_FOREACH(TDefByFile::const_reference iCol, iRow.second)
6060
BOOST_FOREACH(const Defect &def, iCol.second)
6161
if (! /* continue */ visitor(def))
6262
return false;

0 commit comments

Comments
 (0)