mirror of
https://github.com/wjwwood/serial.git
synced 2026-01-22 03:34:53 +08:00
Merge e5331d09fcd88d3c05bfe4cbc85701372672dd40 into 69e0372cf0d3796e84ce9a09aff1d74496f68720
This commit is contained in:
commit
992cb1bd46
@ -3,6 +3,7 @@
|
||||
/* Copyright 2012 William Woodall and John Harrison */
|
||||
|
||||
#include <sstream>
|
||||
#include <algorithm>
|
||||
|
||||
#include "serial/impl/win.h"
|
||||
|
||||
@ -366,7 +367,11 @@ Serial::SerialImpl::setPort (const string &port)
|
||||
string
|
||||
Serial::SerialImpl::getPort () const
|
||||
{
|
||||
return string(port_.begin(), port_.end());
|
||||
string str(port_.length(), 0);
|
||||
std::transform(port_.begin(), port_.end(), str.begin(), [] (wchar_t c) {
|
||||
return (char)c;
|
||||
});
|
||||
return str;
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user