alb3rtobr commented on a change in pull request #619:
URL: https://github.com/apache/geode-native/pull/619#discussion_r442720377



##########
File path: cppcache/src/PdxType.hpp
##########
@@ -205,10 +205,25 @@ class PdxType : public internal::DataSerializableInternal,
   // This is for PdxType as key in std map.
   bool operator<(const PdxType& other) const;

Review comment:
       done

##########
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;
+  return true;
+}
+
+size_t PdxType::hashcode() const {
   std::hash<std::string> strHash;
-  auto result=strHash(this->m_className);
+  auto result = strHash(this->m_className);
 
-  for (std::vector<std::shared_ptr<PdxFieldType>>::iterator it =
-          m_pdxFieldTypes->begin();
+  for (auto it = m_pdxFieldTypes->begin();

Review comment:
       done




----------------------------------------------------------------
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]


Reply via email to