Skip to content

Commit a3feede

Browse files
committed
fix: remove to_string override for int64_t
1 parent 0beb8d3 commit a3feede

File tree

5 files changed

+7
-29
lines changed

5 files changed

+7
-29
lines changed

src/module.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
#include "./socket.h"
99
#include "./zmq_inc.h"
1010
#include "util/error.h"
11-
#include "util/to_string.h"
1211

1312
namespace zmq {
1413
static inline Napi::String Version(const Napi::Env& env) {
@@ -17,8 +16,9 @@ static inline Napi::String Version(const Napi::Env& env) {
1716
int32_t patch = 0;
1817
zmq_version(&major, &minor, &patch);
1918

20-
return Napi::String::New(
21-
env, to_string(major) + "." + to_string(minor) + "." + to_string(patch));
19+
return Napi::String::New(env,
20+
std::to_string(major) + "." + std::to_string(minor) + "."
21+
+ std::to_string(patch));
2222
}
2323

2424
static inline Napi::Object Capabilities(const Napi::Env& env) {

src/observer.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ Observer::Observer(const Napi::CallbackInfo& info)
143143

144144
/* Use `this` pointer as unique identifier for monitoring socket. */
145145
auto address = std::string("inproc://zmq.monitor.")
146-
+ to_string(reinterpret_cast<uintptr_t>(this));
146+
+ std::to_string(reinterpret_cast<uintptr_t>(this));
147147

148148
if (zmq_socket_monitor(target->socket, address.c_str(), ZMQ_EVENT_ALL) < 0) {
149149
ErrnoException(Env(), zmq_errno()).ThrowAsJavaScriptException();

src/proxy.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ Napi::Value Proxy::Run(const Napi::CallbackInfo& info) {
9696

9797
/* Use `this` pointer as unique identifier for control socket. */
9898
auto address = std::string("inproc://zmq.proxycontrol.")
99-
+ to_string(reinterpret_cast<uintptr_t>(this));
99+
+ std::to_string(reinterpret_cast<uintptr_t>(this));
100100

101101
/* Connect publisher so we can start queueing control messages. */
102102
if (zmq_connect(control_pub, address.c_str()) < 0) {

src/util/arguments.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44

55
#include <optional>
66

7-
#include "to_string.h"
8-
97
namespace zmq::Arg {
108

119
using ValueMethod = bool (Napi::Value::*)() const;
@@ -89,7 +87,8 @@ class Validator {
8987
[[nodiscard]] std::optional<Napi::Error> eval(const Napi::CallbackInfo& info) const {
9088
if constexpr (I == N) {
9189
if (info.Length() > N) {
92-
auto msg = "Expected " + to_string(N) + " argument" + (N != 1 ? "s" : "");
90+
auto msg =
91+
"Expected " + std::to_string(N) + " argument" + (N != 1 ? "s" : "");
9392
return Napi::TypeError::New(info.Env(), msg);
9493
}
9594

src/util/to_string.h

Lines changed: 0 additions & 21 deletions
This file was deleted.

0 commit comments

Comments
 (0)