Example #1
0
 bool HasFile(const std::string& filename) {
     for (auto& row : *this) {
         SaveFileRow* srow = dynamic_cast<SaveFileRow*>(row.get());
         if (srow && srow->Filename() == filename)
             return true;
     }
     return false;
 }
Example #2
0
 bool HasFile ( const std::string& filename ) {
     for ( GG::ListBox::iterator it = begin(); it != end(); ++it ) {
         SaveFileRow* row = dynamic_cast<SaveFileRow*> ( *it );
         if ( row ) {
             if ( row->Filename() == filename ) {
                 return true;
             }
         }
     }
     return false;
 }