]> git.mxchange.org Git - flightgear.git/commitdiff
protocol module: minor clean-up
authorThorstenB <brehmt@gmail.com>
Sun, 19 Feb 2012 13:57:25 +0000 (14:57 +0100)
committerThorstenB <brehmt@gmail.com>
Sun, 19 Feb 2012 13:57:25 +0000 (14:57 +0100)
src/Network/generic.cxx
src/Network/generic.hxx

index 930a070849bf03121409f1513d55989e9afee4c2..c9c470e656c65d47d30a07971a89d8db91a8d89f 100644 (file)
@@ -1,4 +1,4 @@
-// generic.cxx -- generic protocal class
+// generic.cxx -- generic protocol class
 //
 // Written by Curtis Olson, started November 1999.
 //
@@ -175,6 +175,7 @@ bool FGGeneric::gen_message_binary() {
             /* FIXME padding for alignment? Something like: 
              * length += (strlength % 4 > 0 ? sizeof(int32_t) - strlength % 4 : 0;
              */
+            break;
         }
     }
 
@@ -329,6 +330,7 @@ bool FGGeneric::parse_message_binary(int length) {
         default: // SG_STRING
             SG_LOG( SG_IO, SG_ALERT, "Generic protocol: "
                     "Ignoring unsupported binary input chunk type.");
+            break;
         }
     }
     
@@ -377,6 +379,7 @@ bool FGGeneric::parse_message_ascii(int length) {
 
         default: // SG_STRING
             _in_message[i].prop->setStringValue(p1);
+            break;
         }
 
         p1 = p2;
index 55f0ca8a5675df995d5c57cab9b67297bab167c8..627f3ef604cc84b0fe647efe70f019d8ca26dfaa 100644 (file)
@@ -113,7 +113,7 @@ private:
       if( prot.max > prot.min )
       {
         if( prot.wrap )
-          new_val = SGMisc<double>::normalizePeriodic(prot.min, prot.max, new_val);
+          new_val = SGMisc<T>::normalizePeriodic(prot.min, prot.max, new_val);
         else
           new_val = SGMisc<T>::clip(new_val, prot.min, prot.max);
       }