]> git.tdb.fi Git - libs/core.git/commitdiff
Avoid a shadowing warning from clang
authorMikko Rasa <tdb@tdb.fi>
Fri, 24 May 2013 14:42:09 +0000 (17:42 +0300)
committerMikko Rasa <tdb@tdb.fi>
Wed, 29 May 2013 08:45:43 +0000 (11:45 +0300)
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
source/io/windows/serial.cpp

index 49d9e9c138da1afaad12cc485b331b96a117bb32..69939a8dee31c5eceea91783b088e77f1941cbf0 100644 (file)
@@ -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");
 }
 
                throw system_error("tcsetattr");
 }
 
index 0092754549bde4f22f4d8ec8c7e947feedeca5be..84a3175f875c4b0b774f1b5e1c1004db1d6bd351 100644 (file)
@@ -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");
 }
 
                throw system_error("SetCommState");
 }