edits
[iotcloud.git] / version2 / src / C / KeyValue.cc
index 561ae80a6e076414255460cd0366db20fd487aaf..96d740d9bfeb3cffc217eb215999ed4e2d11e7a7 100644 (file)
@@ -1,4 +1,6 @@
 #include "KeyValue.h"
+#include "ByteBuffer.h"
+#include "IoTString.h"
 /**
  * KeyValue entry for Slot.
  * @author Brian Demsky <bdemsky@uci.edu>
@@ -8,7 +10,7 @@
 KeyValue *KeyValue_decode(ByteBuffer *bb) {
        int keylength = bb->getInt();
        int valuelength = bb->getInt();
-       Array<char> *key = new Array<char> *(keylength);
+       Array<char> *key = new Array<char>(keylength);
        bb->get(key);
 
        if (valuelength != 0) {
@@ -41,7 +43,7 @@ int KeyValue::getSize() {
                return 2 * sizeof(int32_t) + key->length() + value->length();
        }
 
-       return 2 * sizeof(int32_t) + key.length();
+       return 2 * sizeof(int32_t) + key->length();
 }
 
 KeyValue *KeyValue::getCopy() {