Changeset 3078


Ignore:
Timestamp:
11/25/15 15:35:51 (9 years ago)
Author:
Takeshi Nakazato
Message:

New Development: No

JIRA Issue: No

Ready for Test: Yes

Interface Changes: Yes/No

What Interface Changed: Please list interface changes

Test Programs: List test programs

Put in Release Notes: Yes/No

Module(s): Module Names change impacts.

Description: Describe your changes here...


Make STIdxIter2 warning free. Utility function split is defined inside STIdxIter2 since it is not used outside the class. If it is useful, it will be separated from the class.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/STIdxIter.h

    r2921 r3078  
    1616using namespace casa ;
    1717
    18 namespace {
    19 vector<string> split(const string &str, char delim)
    20 {
    21   vector<string> result;
    22   size_t current = 0;
    23   size_t found;
    24   while ((found = str.find_first_of(delim, current)) != string::npos) {
    25     result.push_back(string(str, current, found - current));
    26     current = found + 1;
    27   }
    28   result.push_back(string(str, current, str.size() - current));
    29   return result;
    30 }
    31 } // anonymous namespace
     18//namespace {
     19//vector<string> split(const string &str, char delim)
     20//{
     21//  vector<string> result;
     22//  size_t current = 0;
     23//  size_t found;
     24//  while ((found = str.find_first_of(delim, current)) != string::npos) {
     25//    result.push_back(string(str, current, found - current));
     26//    current = found + 1;
     27//  }
     28//  result.push_back(string(str, current, str.size() - current));
     29//  return result;
     30//}
     31//} // anonymous namespace
    3232
    3333namespace asap {
     
    6565  virtual void init();
    6666private:
     67  static vector<string> split(const string &str, char delim)
     68  {
     69    vector<string> result;
     70    size_t current = 0;
     71    size_t found;
     72    while ((found = str.find_first_of(delim, current)) != string::npos) {
     73      result.push_back(string(str, current, found - current));
     74      current = found + 1;
     75    }
     76    result.push_back(string(str, current, str.size() - current));
     77    return result;
     78  }
    6779  vector<uInt> tovector(Vector<uInt> v);
    6880  void addSortKey(const string &name);
Note: See TracChangeset for help on using the changeset viewer.