Freesat: Make some members into statics
authorMike Looijmans <milo-software@users.sourceforge.net>
Sun, 5 Jun 2011 08:06:31 +0000 (10:06 +0200)
committerMike Looijmans <milo-software@users.sourceforge.net>
Sun, 5 Jun 2011 08:15:32 +0000 (10:15 +0200)
lib/base/freesatv2.cpp
lib/base/freesatv2.h

index a5a5f86..62c1de9 100644 (file)
@@ -67,10 +67,8 @@ void freesatHuffmanDecoder::loadTables()
 *
 *  \return Raw character
 */
-unsigned char freesatHuffmanDecoder::resolveChar(char *str)
+static unsigned char resolveChar(char *str)
 {
-       int val;
-
        if (str[1] == 0) return str[0];
 
        if ( strcmp(str,"ESCAPE") == 0 )
@@ -85,9 +83,13 @@ unsigned char freesatHuffmanDecoder::resolveChar(char *str)
        {
                return START;
        }
-       else if ( sscanf(str,"0x%02x", &val) == 1 )
+       else
        {
-               return val;
+               int val;
+               if ( sscanf(str,"0x%02x", &val) == 1 )
+               {
+                       return val;
+               }
        }
        return str[0];
 }
@@ -99,7 +101,7 @@ unsigned char freesatHuffmanDecoder::resolveChar(char *str)
 *
 *  \return Decoded value
 */
-unsigned long freesatHuffmanDecoder::decodeBinary(char *binary)
+static unsigned long decodeBinary(char *binary)
 {
        unsigned long mask = 0x80000000;
        unsigned long val = 0;
index 72f1448..af510ab 100644 (file)
@@ -39,8 +39,6 @@ class freesatHuffmanDecoder
 private:
        huffTableEntry  *m_tables[2][256];
        void            loadFile(int tableid, char *filename);
-       unsigned char   resolveChar(char *str);
-       unsigned long   decodeBinary(char *binary);
        void            loadTables();
        bool            m_tablesLoaded;
 public: