Browse Source

[1228] InputBuffer::readVector() cleaned up.

Tomek Mrugalski 13 years ago
parent
commit
66bb38a4d0
1 changed files with 2 additions and 6 deletions
  1. 2 6
      src/lib/util/buffer.h

+ 2 - 6
src/lib/util/buffer.h

@@ -221,12 +221,8 @@ public:
             isc_throw(InvalidBufferPosition, "read beyond end of buffer");
         }
 
-        if (data.size() < len)
-            data.resize(len);
-
-        const uint8_t* ptr = &data_[position_];
-        data = std::vector<uint8_t>(ptr, ptr + len);
-        position_ += len;
+        data.resize(len);
+        readData(&data[0], len);
     }
 
 private: