diff --git a/src/lib/iter-adapter.hpp b/src/lib/iter-adapter.hpp index 1b92fd8ac..9cb5f6bee 100644 --- a/src/lib/iter-adapter.hpp +++ b/src/lib/iter-adapter.hpp @@ -191,15 +191,6 @@ namespace lib { return *this; } - IterAdapter - operator++(int) - { - _maybe_throw(); - IterAdapter oldPos(*this); - iterate(); - return oldPos; - } - bool isValid () const { @@ -334,13 +325,6 @@ namespace lib { return *this; } - RangeIter - operator++(int) - { - _maybe_throw(); - return RangeIter (p_++,e_); - } - bool isValid () const { @@ -551,12 +535,6 @@ namespace lib { return *this; } - PtrDerefIter - operator++(int) - { - return PtrDerefIter (i_++); - } - bool isValid () const { diff --git a/src/proc/mobject/session/defs-registry.hpp b/src/proc/mobject/session/defs-registry.hpp index 53bfa7a93..d72c92014 100644 --- a/src/proc/mobject/session/defs-registry.hpp +++ b/src/proc/mobject/session/defs-registry.hpp @@ -236,7 +236,6 @@ namespace session { public: P operator* () { return ptr; } bool hasNext () { return next || findNext(); } - Iter operator++ (int) { Iter tmp=*this; operator++(); return tmp; } Iter& operator++ () { ptr=findNext(); diff --git a/tests/components/proc/mobject/session/defs-registry-impl-test.cpp b/tests/components/proc/mobject/session/defs-registry-impl-test.cpp index 756001376..6ec3ed9b7 100644 --- a/tests/components/proc/mobject/session/defs-registry-impl-test.cpp +++ b/tests/components/proc/mobject/session/defs-registry-impl-test.cpp @@ -172,33 +172,33 @@ namespace test { { Iter13 i (reg_->candidates(Q13 ("irrelevant query"))); CHECK ( i.hasNext()); - CHECK ( *i++ == o1); // ordered according to the degree of the queries - CHECK ( *i++ == o2); - CHECK ( *i++ == o3); - CHECK ( *i++ == o3); - CHECK ( *i++ == o2); - CHECK ( *i == o1); + CHECK ( *i == o1); ++i; // ordered according to the degree of the queries + CHECK ( *i == o2); ++i; + CHECK ( *i == o3); ++i; + CHECK ( *i == o3); ++i; + CHECK ( *i == o2); ++i; + CHECK ( *i == o1); CHECK (!i.hasNext()); CHECK (! *++i ); // null after end i = reg_->candidates(q3); - CHECK ( *i++ == o3); // found by direct match - CHECK ( *i++ == o1); // followed by the ordered enumeration - CHECK ( *i++ == o2); - CHECK ( *i++ == o3); - CHECK ( *i++ == o3); - CHECK ( *i++ == o2); - CHECK ( *i++ == o1); + CHECK ( *i == o3); ++i; // found by direct match + CHECK ( *i == o1); ++i; // followed by the ordered enumeration + CHECK ( *i == o2); ++i; + CHECK ( *i == o3); ++i; + CHECK ( *i == o3); ++i; + CHECK ( *i == o2); ++i; + CHECK ( *i == o1); ++i; CHECK (!i.hasNext()); i = reg_->candidates(Q13()); - CHECK ( *i++ == o1); // found by direct match to the empty query - CHECK ( *i++ == o1); - CHECK ( *i++ == o2); - CHECK ( *i++ == o3); - CHECK ( *i++ == o3); - CHECK ( *i++ == o2); - CHECK ( *i++ == o1); + CHECK ( *i == o1); ++i; // found by direct match to the empty query + CHECK ( *i == o1); ++i; + CHECK ( *i == o2); ++i; + CHECK ( *i == o3); ++i; + CHECK ( *i == o3); ++i; + CHECK ( *i == o2); ++i; + CHECK ( *i == o1); ++i; CHECK (!i.hasNext()); uint d=0; @@ -230,12 +230,12 @@ namespace test { Iter13 i (reg_->candidates(q4)); CHECK ( i.hasNext()); - CHECK ( *i++ == o1); // ordered according to the degree of the queries - // but the o2 entries are missing - CHECK ( *i++ == o3); - CHECK ( *i++ == o3); + CHECK ( *i == o1); ++i; // ordered according to the degree of the queries + // but the o2 entries are missing + CHECK ( *i == o3); ++i; + CHECK ( *i == o3); ++i; // missing - CHECK ( *i == o1); + CHECK ( *i == o1); CHECK (!i.hasNext()); o3.reset(); // killing the only reference.... @@ -243,33 +243,33 @@ namespace test { i = reg_->candidates(Q13 ("something")); CHECK ( i.hasNext()); - CHECK ( *i++ == o1); // ordered according to the degree of the queries - // but now also the o3 entries are missing... - CHECK ( *i == o1); + CHECK ( *i == o1); ++i; // ordered according to the degree of the queries + // but now also the o3 entries are missing... + CHECK ( *i == o1); CHECK (!i.hasNext()); CHECK ( reg_->put (o1, q5)); // trying to register the same object at the same place // doesn't change anything (but counts as "success") i = reg_->candidates(q5); - CHECK ( *i++ == o1); // direct match - CHECK ( *i++ == o1); - CHECK ( *i++ == o1); + CHECK ( *i == o1); ++i; // direct match + CHECK ( *i == o1); ++i; + CHECK ( *i == o1); ++i; CHECK (!i.hasNext()); CHECK (!reg_->put (o2, q5)); // trying to (re)register o2 with a existing query // counts as failure (nothing changes) i = reg_->candidates(q5); - CHECK ( *i++ == o1); // direct match - CHECK ( *i++ == o1); - CHECK ( *i++ == o1); + CHECK ( *i == o1); ++i; // direct match + CHECK ( *i == o1); ++i; + CHECK ( *i == o1); ++i; CHECK (!i.hasNext()); CHECK ( reg_->put (o2, q2)); // trying to (re)register o2 with another query succeeds i = reg_->candidates(q2); - CHECK ( *i++ == o2); // direct match - CHECK ( *i++ == o1); - CHECK ( *i++ == o2); // inserted here in the dataset - CHECK ( *i++ == o1); + CHECK ( *i == o2); ++i; // direct match + CHECK ( *i == o1); ++i; + CHECK ( *i == o2); ++i; // inserted here in the dataset + CHECK ( *i == o1); ++i; CHECK (!i.hasNext()); CHECK ( reg_->forget (o1)); diff --git a/tests/components/proc/play/output-slot-protocol-test.cpp b/tests/components/proc/play/output-slot-protocol-test.cpp index a1e0fef09..18b54388f 100644 --- a/tests/components/proc/play/output-slot-protocol-test.cpp +++ b/tests/components/proc/play/output-slot-protocol-test.cpp @@ -84,8 +84,8 @@ namespace test { // "calculation streams" for the individual // Channels to be output through this slot. OutputSlot::OpenedSinks sinks = alloc.getOpenedSinks(); - DataSink sink1 = *sinks++; - DataSink sink2 = *sinks++; + DataSink sink1 = *sinks; + DataSink sink2 = *++sinks; // within the frame-calculation "loop" // we perform an data exchange cycle @@ -127,12 +127,12 @@ namespace test { DiagnosticOutputSlot::OutFrames stream1 = checker.getChannel(1); CHECK ( stream0); - CHECK (*stream0++ == testData(0,0)); + CHECK (*stream0 == testData(0,0)); ++stream0; CHECK (!stream0); CHECK ( stream1); - CHECK (*stream1++ == testData(1,0)); - CHECK (*stream1++ == testData(1,1)); + CHECK (*stream1 == testData(1,0)); ++stream1; + CHECK (*stream1 == testData(1,1)); ++stream1; CHECK (!stream1); #if false /////////////////////////////////////////////////////////////////////////////////////////////////////////////UNIMPLEMENTED :: TICKET #819 #endif /////////////////////////////////////////////////////////////////////////////////////////////////////////////UNIMPLEMENTED :: TICKET #819 diff --git a/tests/lib/iter-adapter-test.cpp b/tests/lib/iter-adapter-test.cpp index 6376c49bc..ef6f2c9da 100644 --- a/tests/lib/iter-adapter-test.cpp +++ b/tests/lib/iter-adapter-test.cpp @@ -215,7 +215,10 @@ namespace test{ // now for example the client could.... while ( range ) - cout << "::" << *range++; + { + cout << "::" << *range; + ++range; + } cout << endl; CHECK (isnil (range)); @@ -317,7 +320,7 @@ namespace test{ TestContainer::ref_iterator rI (elms.begin_ref()); CHECK (0 == *rI ); - CHECK (0 == *rI++); + ++rI; CHECK (1 == *rI ); CHECK (2 == *++rI);