From 7a493cb73ff5f5f820d4873d6c993d0e9c5a580a Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Fri, 24 May 2013 17:42:09 +0300 Subject: [PATCH] Avoid a shadowing warning from clang It considers the handle member of the outer class to be shadowed by the parameter of an inner class member function. --- source/io/unix/serial.cpp | 8 ++++---- source/io/windows/serial.cpp | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/source/io/unix/serial.cpp b/source/io/unix/serial.cpp index 49d9e9c..69939a8 100644 --- a/source/io/unix/serial.cpp +++ b/source/io/unix/serial.cpp @@ -33,14 +33,14 @@ void Serial::platform_init(const string &port) } -void Serial::DeviceState::get_from(const Handle &handle) +void Serial::DeviceState::get_from(const Handle &h) { - tcgetattr(*handle, &state); + tcgetattr(*h, &state); } -void Serial::DeviceState::apply_to(const Handle &handle) +void Serial::DeviceState::apply_to(const Handle &h) { - if(tcsetattr(*handle, TCSADRAIN, &state)==-1) + if(tcsetattr(*h, TCSADRAIN, &state)==-1) throw system_error("tcsetattr"); } diff --git a/source/io/windows/serial.cpp b/source/io/windows/serial.cpp index 0092754..84a3175 100644 --- a/source/io/windows/serial.cpp +++ b/source/io/windows/serial.cpp @@ -28,14 +28,14 @@ void Serial::platform_init(const string &port) } -void Serial::DeviceState::get_from(const Handle &handle) +void Serial::DeviceState::get_from(const Handle &h) { - GetCommState(*handle, &state); + GetCommState(*h, &state); } -void Serial::DeviceState::apply_to(const Handle &handle) +void Serial::DeviceState::apply_to(const Handle &h) { - if(SetCommState(*handle, &state)==0) + if(SetCommState(*h, &state)==0) throw system_error("SetCommState"); } -- 2.43.0