-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/627/#review506
-----------------------------------------------------------
1. To be complete the equality tests must propagate to the .NET binding as
well. See patch below.
2. This patch changes the API/ABI a little does it not?
For the .NET case assume you have Duration A(100) and Duration B(100).
Before this patch A==B is false and after this patch A==B is true.
How can we sell that?
-Chuck
Index: qpid/cpp/bindings/qpid/dotnet/src/Duration.h
===================================================================
--- qpid/cpp/bindings/qpid/dotnet/src/Duration.h (revision 1089977)
+++ qpid/cpp/bindings/qpid/dotnet/src/Duration.h (working copy)
@@ -81,8 +81,18 @@
Duration ^ result = gcnew Duration(multiplier * dur->Milliseconds);
return result;
}
- };
+ static bool operator == (Duration ^ a, Duration ^ b)
+ {
+ return a->Milliseconds == b->Milliseconds;
+ }
+
+ static bool operator != (Duration ^ a, Duration ^ b)
+ {
+ return a->Milliseconds != b->Milliseconds;
+ }
+};
+
public ref class DurationConstants sealed
{
private:
- Chug
On 2011-04-20 16:47:00, Gordon Sim wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/627/
> -----------------------------------------------------------
>
> (Updated 2011-04-20 16:47:00)
>
>
> Review request for qpid, Andrew Stitcher, Alan Conway, Chug Rolke, and Steve
> Huston.
>
>
> Summary
> -------
>
> Fixes ttl overflow on the broker. Added equality operator for
> qpid::messaging::Duration (needed it in test and seemed generally valuable).
>
>
> This addresses bug QPID-3222.
> https://issues.apache.org/jira/browse/QPID-3222
>
>
> Diffs
> -----
>
> /trunk/qpid/cpp/include/qpid/messaging/Duration.h 1090157
> /trunk/qpid/cpp/src/qpid/broker/Message.cpp 1090157
> /trunk/qpid/cpp/src/qpid/messaging/Duration.cpp 1090157
> /trunk/qpid/cpp/src/tests/MessagingSessionTests.cpp 1090157
>
> Diff: https://reviews.apache.org/r/627/diff
>
>
> Testing
> -------
>
> New test added, make check passes.
>
>
> Thanks,
>
> Gordon
>
>