summaryrefslogtreecommitdiffhomepage
path: root/benchmarks/vector_vs_deque.cpp
diff options
context:
space:
mode:
authorTyge Løvset <[email protected]>2020-12-30 17:54:41 +0100
committerTyge Løvset <[email protected]>2020-12-30 17:54:41 +0100
commit3a01dac7e392da596c007cd69d089865daf4c50c (patch)
tree2784634a5976fbb3f37a9970a362fd4b671dcd60 /benchmarks/vector_vs_deque.cpp
parent9b2e35df109264cc2a2ca5ccc34f80eb95aa5bd7 (diff)
downloadSTC-modified-3a01dac7e392da596c007cd69d089865daf4c50c.tar.gz
STC-modified-3a01dac7e392da596c007cd69d089865daf4c50c.zip
Fixed memory leak in cvec_X_resize and cdeq_X_resize. Removed macros cdeq_size, cdeq_capacity, cdeq_empty. Use the cvec_X_* names instead.
Diffstat (limited to 'benchmarks/vector_vs_deque.cpp')
-rw-r--r--benchmarks/vector_vs_deque.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/benchmarks/vector_vs_deque.cpp b/benchmarks/vector_vs_deque.cpp
index 6c26a823..c9e612f2 100644
--- a/benchmarks/vector_vs_deque.cpp
+++ b/benchmarks/vector_vs_deque.cpp
@@ -11,7 +11,7 @@
#include <stc/crand.h>
typedef struct {const char* first; int second;} Si;
-using_cvec(si, Si, c_default_del, c_no_compare);
+using_cvec(si, Si, c_no_compare);
cvec_si tm = cvec_inits;
void add(cvec_si* tm, const char* s, int n) { Si si = {s, n}; cvec_si_push_back(tm, si); }
@@ -48,7 +48,7 @@ void test_vector(const int num_iterations)
}
clock_t t2 = std::clock();
- add(&tm, "vector::push_front", t2 - t1);
+ add(&tm, "vector::push_back", t2 - t1);
printf("#");
}