-
Notifications
You must be signed in to change notification settings - Fork 1.6k
ObjectValue changes #8007
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ObjectValue changes #8007
Conversation
EXPECT_EQ(WrapObject("a", "object_value"), object_value); | ||
object_value.Set(Field("a"), Wrap("object_value")); | ||
object_value.Set(Field("a"), Value("object_value")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: Value is the function name in master
, so this actually reduces the diff.
Generated by 🚫 Danger |
61e2c94
to
1479556
Compare
1479556
to
3a0eb06
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Almost LGTM with one question.
/** `MutableObjectValue` models unique ownership. */ | ||
MutableObjectValue(const MutableObjectValue&) = delete; | ||
MutableObjectValue& operator=(const MutableObjectValue&) = delete; | ||
ObjectValue& operator=(const ObjectValue&) = delete; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this class copy constructible but not copy assignable?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I would need this operator:
Message& operator=(const Message&) = delete; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right.
@var-const Can you take another look? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry about the delay! LGTM.
/** `MutableObjectValue` models unique ownership. */ | ||
MutableObjectValue(const MutableObjectValue&) = delete; | ||
MutableObjectValue& operator=(const MutableObjectValue&) = delete; | ||
ObjectValue& operator=(const ObjectValue&) = delete; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right.
This PR is part of the larger series and renames MutableObjectValue to ObjectValue (the original ObjectValue is gone). It also adds support for unsorted MapValues, since the Watch backend does in fact send unsorted maps.