From f4fcbd57c49b796b87ffadaa90b1d0d3bf6f7497 Mon Sep 17 00:00:00 2001 From: Softonik Date: Tue, 13 Feb 2024 21:51:49 +0300 Subject: [PATCH] =?UTF-8?q?=D0=A1=D1=86=D0=B5=D0=BD=D0=B0=D1=80=D0=B8?= =?UTF-8?q?=D0=B9:=20=D0=9F=D1=80=D0=B5=D0=BE=D0=B1=D1=80=D0=B0=D0=B7?= =?UTF-8?q?=D0=BE=D0=B2=D0=B0=D0=BD=D0=B8=D0=B5=20fmt->Sprint()=20->=20std?= =?UTF-8?q?::to=5Fstring()?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkg/service/features/app.feature | 18 ++++++++++++++++++ pkg/service/mapping.go | 1 + 2 files changed, 19 insertions(+) diff --git a/pkg/service/features/app.feature b/pkg/service/features/app.feature index c37bb99..47776ac 100644 --- a/pkg/service/features/app.feature +++ b/pkg/service/features/app.feature @@ -550,6 +550,14 @@ void loop() {} ``` package test +type device struct { +} +func (d *device) doSomething() { + a := "" + a += fmt.Sprint(5) + a += "A " + fmt.Sprint(19) + " A " + fmt.Sprint(a) +} + func Setup() { a := "" a += fmt.Sprint(5) @@ -558,7 +566,17 @@ func Setup() { ``` * Результат: ``` +class device { +public: + void doSomething(); +}; void setup(); +void device::doSomething() { +std::string a=""; +a+=std::to_string(5); +a+="A "+std::to_string(19)+" A "+std::to_string(a); +} + void setup() { std::string a=""; a+=std::to_string(5); diff --git a/pkg/service/mapping.go b/pkg/service/mapping.go index ba3479e..e63726d 100644 --- a/pkg/service/mapping.go +++ b/pkg/service/mapping.go @@ -2,6 +2,7 @@ package service var mapping = map[string]string{ "fmt.Sprint": "std::to_string", + "fmt->Sprint": "std::to_string", "digital.Low": "LOW", "digital.High": "HIGH", "digital.ModeInput": "INPUT",