Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mumble-voip/mumble.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavide Beatrici <davidebeatrici@gmail.com>2019-10-11 22:58:39 +0300
committerDavide Beatrici <davidebeatrici@gmail.com>2019-10-11 22:58:39 +0300
commit5e247f258c0a2fbdabb74361890cad1ccac68407 (patch)
tree663d9e3b1ff2860a920a2cf481fa5c447c658391 /plugins/gw
parentd40fbe8c3b98873501cc39b58f4ffc5c09cfeae4 (diff)
plugins: replace MSVC string functions with C++ ones
Diffstat (limited to 'plugins/gw')
-rw-r--r--plugins/gw/gw.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/plugins/gw/gw.cpp b/plugins/gw/gw.cpp
index cbb938c75..fc504a9b2 100644
--- a/plugins/gw/gw.cpp
+++ b/plugins/gw/gw.cpp
@@ -159,15 +159,14 @@ static int fetch(float *avatar_pos, float *avatar_front, float *avatar_top, floa
calcout(pos, front, cam, camfront, avatar_pos, avatar_front, camera_pos, camera_front);
if (areaid != prev_areaid || location != prev_location) {
- context.clear();
-
prev_areaid = areaid;
prev_location = location;
- char buffer[50];
- sprintf_s(buffer, sizeof(buffer), "{\"instance\": \"%d:%d\"}", areaid, static_cast<int>(location));
- context.assign(buffer);
+ std::ostringstream contextstream;
+ contextstream << "{\"instance\": \"" << areaid << ":" << static_cast<int>(location) << "\"}";
+ context = contextstream.str();
}
+
return true;
}