mirror of
https://github.com/wjwwood/serial.git
synced 2026-01-23 04:04:54 +08:00
Refine setTimeout by const reference
This commit is contained in:
parent
683e12d2f6
commit
907b9f4aff
@ -141,7 +141,7 @@ public:
|
|||||||
getPort () const;
|
getPort () const;
|
||||||
|
|
||||||
void
|
void
|
||||||
setTimeout (Timeout &timeout);
|
setTimeout (const Timeout &timeout);
|
||||||
|
|
||||||
Timeout
|
Timeout
|
||||||
getTimeout () const;
|
getTimeout () const;
|
||||||
|
|||||||
@ -130,7 +130,7 @@ public:
|
|||||||
getPort () const;
|
getPort () const;
|
||||||
|
|
||||||
void
|
void
|
||||||
setTimeout (Timeout &timeout);
|
setTimeout (const Timeout &timeout);
|
||||||
|
|
||||||
Timeout
|
Timeout
|
||||||
getTimeout () const;
|
getTimeout () const;
|
||||||
|
|||||||
@ -458,7 +458,7 @@ public:
|
|||||||
* \see serial::Timeout
|
* \see serial::Timeout
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
setTimeout (Timeout &timeout);
|
setTimeout (const Timeout &timeout);
|
||||||
|
|
||||||
/*! Sets the timeout for reads and writes. */
|
/*! Sets the timeout for reads and writes. */
|
||||||
void
|
void
|
||||||
|
|||||||
@ -707,7 +707,7 @@ Serial::SerialImpl::getPort () const
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Serial::SerialImpl::setTimeout (serial::Timeout &timeout)
|
Serial::SerialImpl::setTimeout (const serial::Timeout &timeout)
|
||||||
{
|
{
|
||||||
timeout_ = timeout;
|
timeout_ = timeout;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -370,7 +370,7 @@ Serial::SerialImpl::getPort () const
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Serial::SerialImpl::setTimeout (serial::Timeout &timeout)
|
Serial::SerialImpl::setTimeout (const serial::Timeout &timeout)
|
||||||
{
|
{
|
||||||
timeout_ = timeout;
|
timeout_ = timeout;
|
||||||
if (is_open_) {
|
if (is_open_) {
|
||||||
|
|||||||
@ -295,7 +295,7 @@ Serial::getPort () const
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Serial::setTimeout (serial::Timeout &timeout)
|
Serial::setTimeout (const serial::Timeout &timeout)
|
||||||
{
|
{
|
||||||
pimpl_->setTimeout (timeout);
|
pimpl_->setTimeout (timeout);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user