Hi all:
I'm trying to enter this at trac.cppcheck.net, but I'm starting to think I'll never get the verification email :-(
Anyway, what looks like a false positive:
[nsb/api/include/dateTime.h:169]: (style, inconclusive) Technically the member function 'ServiceBus::DateTime::operator++' can be const.
DateTime operator++(int) { <----- 'line No 169' DateTime d = this; ++(this); return d; }
Thanks again for a terrific tool!
Although the code sample is incomplete, this is basically https://trac.cppcheck.net/ticket/10077 The warning appears for
struct DateTime { int i{}; DateTime operator++() {++i;} DateTime operator++(int) { DateTime d = *this; ++(*this); return d; } };
Log in to post a comment.
Hi all:
I'm trying to enter this at trac.cppcheck.net, but I'm starting to think I'll never get the verification email :-(
Anyway, what looks like a false positive:
[nsb/api/include/dateTime.h:169]: (style, inconclusive) Technically the member function 'ServiceBus::DateTime::operator++' can be const.
DateTime operator++(int) { <----- 'line No 169'
DateTime d = this;
++(this);
return d;
}
Thanks again for a terrific tool!
Although the code sample is incomplete, this is basically https://trac.cppcheck.net/ticket/10077
The warning appears for