Alan Conway wrote:
On Tue, 2008-10-07 at 12:29 -0400, Andrew Stitcher wrote:
On Tue, 2008-10-07 at 10:01 -0400, Alan Conway wrote:
As a step towards using standard STL collection interfaces for things
like framing::FieldTable and Array, and towards greater clarity in
general, I'd like to rename size() for encoded types as encodedSize().
size() is used in STL to mean the size of a container. Since some of our
encoded types are also containers (FieldTable, Array), our non-standard
use of size() and count() is confusing.

I've got it done in a working copy. Anyone have objections?
I think that sounds like a good idea.

Diff attached.
You haven't compiled this diff, have you? :)

Did you see a problem with it? I've just compiled again on an updated
copy, it works fine for me.

I think Andrew might be referring to the diff below. Not sure why your compiler likes it.

--- incubator/qpid/trunk/qpid/cpp/src/tests/Frame.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/src/tests/Frame.cpp Tue Oct  7 10:24:24 2008
@@ -33,7 +33,7 @@
    Frame f(42, AMQContentBody("foobar"));
    AMQBody* body=f.getBody();
    BOOST_CHECK(dynamic_cast<AMQContentBody*>(body));
-    Buffer b(f.size());
+    Buffer b(f.encodedSize();
    f.encode(b);

Reply via email to