From 9b23b89fc2d300a0030d170a053917ee422b2f20 Mon Sep 17 00:00:00 2001 From: Alexander Bondarev Date: Tue, 9 Jan 2024 10:34:02 +0200 Subject: [PATCH] [rd-cpp] Fix array fields serialization and generation. --- rd-cpp/src/rd_core_cpp/src/main/std/list.h | 2 +- .../src/main/protocol/Buffer.h | 12 ++--- .../rd/generator/nova/cpp/Cpp17Generator.kt | 13 +++-- .../com/jetbrains/rd/models/demo/DemoModel.kt | 4 ++ .../asis/ExampleModelNova/Baz.cpp | 52 ++++++++----------- .../asis/ExampleModelNova/Document.cpp | 12 ++--- .../asis/ExampleModelNova/Selection.cpp | 4 +- .../reversed/ExampleModelNova/Baz.cpp | 16 +++--- .../reversed/ExampleModelNova/Document.cpp | 12 ++--- .../reversed/ExampleModelNova/Selection.cpp | 4 +- 10 files changed, 67 insertions(+), 64 deletions(-) diff --git a/rd-cpp/src/rd_core_cpp/src/main/std/list.h b/rd-cpp/src/rd_core_cpp/src/main/std/list.h index dd6ecc810..ca9cecd1e 100644 --- a/rd-cpp/src/rd_core_cpp/src/main/std/list.h +++ b/rd-cpp/src/rd_core_cpp/src/main/std/list.h @@ -21,7 +21,7 @@ int32_t size(std::vector const& value) template int32_t size(std::vector const& value) { - return std::size(value); + return static_cast(std::size(value)); } #endif diff --git a/rd-cpp/src/rd_framework_cpp/src/main/protocol/Buffer.h b/rd-cpp/src/rd_framework_cpp/src/main/protocol/Buffer.h index 10b4e8261..9b3a4b48d 100644 --- a/rd-cpp/src/rd_framework_cpp/src/main/protocol/Buffer.h +++ b/rd-cpp/src/rd_framework_cpp/src/main/protocol/Buffer.h @@ -126,9 +126,9 @@ class RD_FRAMEWORK_API Buffer final } template