Browse Source

There were an incorrect number of "f"s in several instances of 0x7fffffffffffffff

Ian Goldberg 5 months ago
parent
commit
420d39d797
2 changed files with 5 additions and 5 deletions
  1. 4 4
      heap.cpp
  2. 1 1
      heap.hpp

+ 4 - 4
heap.cpp

@@ -487,10 +487,10 @@ std::pair<RegXS, RegBS> MinHeap::restore_heap_property_optimized(MPCTIO &tio, yi
 }
 
 
-// Intializes the heap array with 0x7fffffffffffff
+// Intializes the heap array with 0x7fffffffffffffff
 void MinHeap::init(MPCTIO &tio, yield_t & yield) {
     auto HeapArray = oram.flat(tio, yield);
-    HeapArray.init(0x7fffffffffffff);
+    HeapArray.init(0x7fffffffffffffff);
     num_items = 0;
 }
 
@@ -506,7 +506,7 @@ void MinHeap::init(MPCTIO &tio, yield_t & yield, size_t n) {
         if (i >= 1 && i <= n) {
             return i*100;
         } else {
-            return size_t(0x7fffffffffffff);
+            return size_t(0x7fffffffffffffff);
         }
     });
 }
@@ -661,7 +661,7 @@ RegAS MinHeap::extract_min(MPCTIO &tio, yield_t & yield, int is_optimized) {
     minval = HeapArray[1];
     HeapArray[1] = RegAS(HeapArray[num_items]);
     RegAS v;
-    v.ashare = 0x7fffffffffffff * !tio.player();
+    v.ashare = 0x7fffffffffffffff * !tio.player();
     HeapArray[num_items] = v;
     num_items--;
 

+ 1 - 1
heap.hpp

@@ -43,7 +43,7 @@ public:
     // return value is the share of the minimum value (the root)
     RegAS extract_min(MPCTIO &tio, yield_t & yield, int is_optimized = 1);
 
-    // Intializes the heap array with 0x7fffffffffffff
+    // Intializes the heap array with 0x7fffffffffffffff
     void init(MPCTIO &tio, yield_t & yield);
 
     // This function simply inits a heap with values 100,200,...,100*n