File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -130,7 +130,7 @@ Napi::Value Close(const Napi::CallbackInfo& info) {
130130 Napi::Function callback = info[1 ].As <Napi::Function>();
131131 CloseBaton* baton = new CloseBaton (callback);
132132 baton->fd = info[0 ].ToNumber ().Int64Value ();;
133-
133+
134134 baton->Queue ();
135135 return env.Undefined ();
136136}
@@ -189,7 +189,7 @@ Napi::Value Set(const Napi::CallbackInfo& info) {
189189 baton->dtr = getBoolFromObject (options, " dtr" );
190190 baton->dsr = getBoolFromObject (options, " dsr" );
191191 baton->lowLatency = getBoolFromObject (options, " lowLatency" );
192-
192+
193193 baton->Queue ();
194194 return env.Undefined ();
195195}
@@ -263,13 +263,15 @@ Napi::Value Drain(const Napi::CallbackInfo& info) {
263263 Napi::Function callback = info[1 ].As <Napi::Function>();
264264 DrainBaton* baton = new DrainBaton (callback);
265265 baton->fd = fd;
266-
266+
267267 baton->Queue ();
268268 return env.Undefined ();
269269}
270270
271271inline SerialPortParity ToParityEnum (const Napi::String& napistr) {
272- const char * str = napistr.Utf8Value ().c_str ();
272+ auto tmp = napistr.Utf8Value ();
273+ const char * str = tmp.c_str ();
274+
273275 size_t count = strlen (str);
274276 SerialPortParity parity = SERIALPORT_PARITY_NONE;
275277 if (!strncasecmp (str, " none" , count)) {
You can’t perform that action at this time.
0 commit comments