Skip to content

Commit

Permalink
Do not allocate in GenericVector default ctor
Browse files Browse the repository at this point in the history
  • Loading branch information
pnordhus committed Jun 17, 2016
1 parent b6db68f commit 907de59
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ccutil/genericvector.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@
template <typename T>
class GenericVector {
public:
GenericVector() {
init(kDefaultVectorSize);
}
GenericVector() : size_used_(0), size_reserved_(0), data_(NULL),
clear_cb_(NULL), compare_cb_(NULL) {}

GenericVector(int size, T init_val) {
init(size);
init_to_size(size, init_val);
Expand Down

0 comments on commit 907de59

Please sign in to comment.