You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@datasketches.apache.org by "AlexanderSaydakov (via GitHub)" <gi...@apache.org> on 2023/05/15 19:59:54 UTC

[GitHub] [datasketches-cpp] AlexanderSaydakov commented on a diff in pull request #373: Avoid warnings

AlexanderSaydakov commented on code in PR #373:
URL: https://github.com/apache/datasketches-cpp/pull/373#discussion_r1194305087


##########
count/include/count_min_impl.hpp:
##########
@@ -291,76 +288,75 @@ void count_min_sketch<W,A>::serialize(std::ostream& os) const {
   //const uint8_t preamble_longs = is_empty() ? PREAMBLE_LONGS_SHORT : PREAMBLE_LONGS_FULL;
   const uint8_t preamble_longs = PREAMBLE_LONGS_SHORT;
   const uint8_t ser_ver = SERIAL_VERSION_1;
-  const uint8_t family_id = FAMILY_ID ;
+  const uint8_t family_id = FAMILY_ID;
   const uint8_t flags_byte = (is_empty() ? 1 << flags::IS_EMPTY : 0);
-  const uint32_t unused32 = NULL_32 ;
-  write(os, preamble_longs) ;
-  write(os, ser_ver) ;
-  write(os, family_id) ;
-  write(os, flags_byte) ;
-  write(os, unused32) ;
+  const uint32_t unused32 = NULL_32;
+  write(os, preamble_longs);
+  write(os, ser_ver);
+  write(os, family_id);
+  write(os, flags_byte);
+  write(os, unused32);
 
   // Long 1
-  const uint32_t nbuckets = _num_buckets ;
-  const uint8_t nhashes = _num_hashes ;
+  const uint32_t nbuckets = _num_buckets;
+  const uint8_t nhashes = _num_hashes;
   const uint16_t seed_hash(compute_seed_hash(_seed));
   const uint8_t unused8 =  NULL_8;
-  write(os, nbuckets) ;
-  write(os, nhashes) ;
-  write(os, seed_hash) ;
-  write(os, unused8) ;
-  if (is_empty()) return  ; // sketch is empty, no need to write further bytes.
+  write(os, nbuckets);
+  write(os, nhashes);
+  write(os, seed_hash);
+  write(os, unused8);
+  if (is_empty()) return ; // sketch is empty, no need to write further bytes.

Review Comment:
   Ops, that was context replacement. I did not notice that there are two spaces sometimes. I will fix that shortly.



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

To unsubscribe, e-mail: commits-unsubscribe@datasketches.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datasketches.apache.org
For additional commands, e-mail: commits-help@datasketches.apache.org