alb3rtobr commented on a change in pull request #619:
URL: https://github.com/apache/geode-native/pull/619#discussion_r442686964
##########
File path: cppcache/src/PdxType.cpp
##########
@@ -568,16 +568,32 @@ bool PdxType::operator<(const PdxType& other) const {
return false;
}
-int32_t PdxType::hashcode() const {
+bool PdxType::operator==(const PdxType& other) const {
+ if (this->m_className != other.m_className){
+ return false;
+ }
+
+ if(this->m_noJavaClass != other.m_noJavaClass){
+ return false;
+ }
+
+ if(this->getTotalFields() != other.getTotalFields()){
+ return false;
+ }
+
+ //TODO: Compare m_pdxFieldTypes & other.m_pdxFieldTypes;
Review comment:
I wanted to separate in a different commit the check of the fields, as I
was not sure how to do it. I was exploring the possibility to change
`m_pdxFieldTypes` to be a set instead of a vector, for easy comparision of
values, but that change had a lot of impacts. After that I realized I could use
the `m_fieldNameVsPdxType` map for the comparision of the fields. Thinking
about the order of the fields, better to compare two maps than two vectors.
Next commit after this one removes this TODO
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]