Show
Ignore:
Timestamp:
09/06/07 13:09:35 (17 years ago)
Author:
wagi
Message:

- one tokenize function is enough. currently in serialize.h defined, this might change
- saveCache code workover. The cache is now created in ~/.ffado/cache. It is actived since it should break
things. Otherwise it needs fixing.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/libffado/src/genericavc/avc_vendormodel.cpp

    r607 r620  
    2323 
    2424#include "genericavc/avc_vendormodel.h" 
     25#include "libutil/serialize.h" 
    2526 
    2627#include <fstream> 
     
    3435using namespace std; 
    3536 
    36 static void 
    37 tokenize(const string& str, 
    38          vector<string>& tokens, 
    39          const string& delimiters = " ") 
    40 { 
    41     // Skip delimiters at beginning. 
    42     string::size_type lastPos = str.find_first_not_of(delimiters, 0); 
    43     // Find first "non-delimiter". 
    44     string::size_type pos     = str.find_first_of(delimiters, lastPos); 
    45  
    46     while (string::npos != pos || string::npos != lastPos) 
    47     { 
    48         // Found a token, add it to the vector. 
    49         tokens.push_back(str.substr(lastPos, pos - lastPos)); 
    50         // Skip delimiters.  Note the "not_of" 
    51         lastPos = str.find_first_not_of(delimiters, pos); 
    52         // Find next "non-delimiter" 
    53         pos = str.find_first_of(delimiters, lastPos); 
    54     } 
    55 } 
    56  
    57 //------------------------------------------------- 
    58  
    5937GenericAVC::VendorModelEntry::VendorModelEntry() 
    6038    : vendor_id( 0 ) 
     
    8967{ 
    9068    bool equal=true; 
    91      
     69 
    9270    equal &= (vendor_id   == rhs.vendor_id); 
    9371    equal &= (model_id    == rhs.model_id); 
     
    216194    if ( it != m_vendorModelEntries.end() ) 
    217195        return *it; 
    218          
     196 
    219197    struct VendorModelEntry invalid; 
    220198    return invalid;