Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refine setTimeout by const reference #211

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion include/serial/impl/unix.h
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ class serial::Serial::SerialImpl {
getPort () const;

void
setTimeout (Timeout &timeout);
setTimeout (const Timeout &timeout);

Timeout
getTimeout () const;
Expand Down
2 changes: 1 addition & 1 deletion include/serial/impl/win.h
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ class serial::Serial::SerialImpl {
getPort () const;

void
setTimeout (Timeout &timeout);
setTimeout (const Timeout &timeout);

Timeout
getTimeout () const;
Expand Down
2 changes: 1 addition & 1 deletion include/serial/serial.h
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@ class Serial {
* \see serial::Timeout
*/
void
setTimeout (Timeout &timeout);
setTimeout (const Timeout &timeout);

/*! Sets the timeout for reads and writes. */
void
Expand Down
2 changes: 1 addition & 1 deletion src/impl/unix.cc
Original file line number Diff line number Diff line change
Expand Up @@ -707,7 +707,7 @@ Serial::SerialImpl::getPort () const
}

void
Serial::SerialImpl::setTimeout (serial::Timeout &timeout)
Serial::SerialImpl::setTimeout (const serial::Timeout &timeout)
{
timeout_ = timeout;
}
Expand Down
2 changes: 1 addition & 1 deletion src/impl/win.cc
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ Serial::SerialImpl::getPort () const
}

void
Serial::SerialImpl::setTimeout (serial::Timeout &timeout)
Serial::SerialImpl::setTimeout (const serial::Timeout &timeout)
{
timeout_ = timeout;
if (is_open_) {
Expand Down
2 changes: 1 addition & 1 deletion src/serial.cc
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ Serial::getPort () const
}

void
Serial::setTimeout (serial::Timeout &timeout)
Serial::setTimeout (const serial::Timeout &timeout)
{
pimpl_->setTimeout (timeout);
}
Expand Down