summaryrefslogtreecommitdiffhomepage
path: root/benchmarks/misc/string_bench_STC.cpp
diff options
context:
space:
mode:
authorTyge Løvset <[email protected]>2022-08-12 21:54:53 +0200
committerTyge Løvset <[email protected]>2022-08-12 21:54:53 +0200
commitccb63f1abbae18657708dd8ea38e0892aa0fc48a (patch)
treef64f432f79ce1552951e2a88d80824af964878b6 /benchmarks/misc/string_bench_STC.cpp
parent5f8a7951996728f6e91ef9ae2e904ce51ac0c883 (diff)
downloadSTC-modified-ccb63f1abbae18657708dd8ea38e0892aa0fc48a.tar.gz
STC-modified-ccb63f1abbae18657708dd8ea38e0892aa0fc48a.zip
cstr V4: Changed cstr functions to take pointers to self, not values. This is consistent with the rest of the containers. csview will still use values, as it is designed to be passed by value.
Diffstat (limited to 'benchmarks/misc/string_bench_STC.cpp')
-rw-r--r--benchmarks/misc/string_bench_STC.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/benchmarks/misc/string_bench_STC.cpp b/benchmarks/misc/string_bench_STC.cpp
index 648cb1f3..065b6dd7 100644
--- a/benchmarks/misc/string_bench_STC.cpp
+++ b/benchmarks/misc/string_bench_STC.cpp
@@ -101,7 +101,7 @@ void initShortStringVec(cvec_str* vs, cvec_sv* vsv)
c_foreach (i, cvec_str, *vs)
{
cvec_sv_push_back(vsv, cstr_sv(i.ref));
- num += cstr_size(*i.ref);
+ num += cstr_size(i.ref);
}
std::cout << "num strings: " << cvec_sv_size(vsv) << std::endl;
std::cout << "avg str len: " << num / (float)cvec_sv_size(vsv) << std::endl;
@@ -147,7 +147,7 @@ void initLongStringVec(cvec_str* vs, cvec_sv* vsv)
c_foreach (i, cvec_str, *vs)
{
cvec_sv_push_back(vsv, cstr_sv(i.ref));
- num += cstr_size(*i.ref);
+ num += cstr_size(i.ref);
}
std::cout << "num strings: " << cvec_sv_size(vsv) << std::endl;
std::cout << "avg str len: " << num / (float)cvec_sv_size(vsv) << std::endl;