Page MenuHomePhabricator

csharp: Add comparables operator to eina_error.
ClosedPublic

Authored by brunobelo on Oct 18 2019, 2:51 PM.

Diff Detail

Repository
rEFL core/efl
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
brunobelo created this revision.Oct 18 2019, 2:51 PM
brunobelo requested review of this revision.Oct 18 2019, 2:51 PM
YOhoho requested changes to this revision.Oct 24 2019, 1:01 AM
YOhoho added inline comments.
src/bindings/mono/eina_mono/eina_error.cs
204

CompareTo should return 1 if err is null.

213

I'm not sure this method is needed. Error class does not implement IComparable.

228

I'm not sure that static Compare method is necessary.

You can use CompareTo in operator-overloading. check the comment below.

277

You can use CompareTo
for example,
lhs.CompareTo(rhs) < 0;

This revision now requires changes to proceed.Oct 24 2019, 1:01 AM
brunobelo added inline comments.Oct 25 2019, 5:31 AM
src/bindings/mono/eina_mono/eina_error.cs
204

Eina.Error is a struct, in c#, can structs be null?

YOhoho accepted this revision.Oct 27 2019, 3:36 PM

struct can't be null.

This revision is now accepted and ready to land.Oct 27 2019, 3:36 PM
This revision was automatically updated to reflect the committed changes.