Skip to content

Commit 6d59307

Browse files
committed
fix(benchmark): fix missing cast
parser.parse() takes a size_t, but size() is an int. Insert an explicit cast to avoid compilation warnings.
1 parent 55ffa44 commit 6d59307

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

benchmark/benchmark-lsp/benchmark-config.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,8 @@ Benchmark_Config Benchmark_Config::load() {
389389
if (parser
390390
.parse(reinterpret_cast<const char*>(
391391
package_json_content->data()),
392-
package_json_content->size())
392+
narrow_cast<std::size_t>(
393+
package_json_content->size()))
393394
.get(root) != ::simdjson::SUCCESS) {
394395
std::fprintf(stderr, "error: %s: parsing JSON failed\n",
395396
package_json_path);

0 commit comments

Comments
 (0)