From 40946423be275566009d73c49e0e6c75631d7ecf Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Wed, 21 Dec 2005 09:00:54 +0000 Subject: [PATCH] find, size --- stepmania/src/smpackage/SMPackageInstallDlg.cpp | 6 +++--- stepmania/src/smpackage/SMPackageUtil.cpp | 2 +- stepmania/src/smpackage/SmpackageExportDlg.cpp | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/stepmania/src/smpackage/SMPackageInstallDlg.cpp b/stepmania/src/smpackage/SMPackageInstallDlg.cpp index 4cec95e521..38706317a0 100644 --- a/stepmania/src/smpackage/SMPackageInstallDlg.cpp +++ b/stepmania/src/smpackage/SMPackageInstallDlg.cpp @@ -206,15 +206,15 @@ bool CSMPackageInstallDlg::CheckPackages() char cwd_[MAX_PATH]; _getcwd(cwd_, MAX_PATH); RString cwd(cwd_); - if( cwd[cwd.GetLength()-1] != '\\' ) + if( cwd[cwd.size()-1] != '\\' ) cwd += "\\"; for( i = 0; i < (int) Directories.size(); ++i ) { RString path = cwd+Directories[i]; char buf[1024]; - memcpy(buf, path, path.GetLength()+1); - buf[path.GetLength()+1] = 0; + memcpy( buf, path, path.size()+1 ); + buf[path.size()+1] = 0; SHFILEOPSTRUCT op; memset(&op, 0, sizeof(op)); diff --git a/stepmania/src/smpackage/SMPackageUtil.cpp b/stepmania/src/smpackage/SMPackageUtil.cpp index ff333902f8..a6ba18ba6e 100644 --- a/stepmania/src/smpackage/SMPackageUtil.cpp +++ b/stepmania/src/smpackage/SMPackageUtil.cpp @@ -117,7 +117,7 @@ bool SMPackageUtil::SetPref( RString name, bool val ) * songs and note skins, this is the first three. */ RString SMPackageUtil::GetPackageDirectory(RString path) { - if( path.Find("CVS") != -1 ) + if( path.find("CVS") != string::npos ) return ""; // skip vector Parts; diff --git a/stepmania/src/smpackage/SmpackageExportDlg.cpp b/stepmania/src/smpackage/SmpackageExportDlg.cpp index c08b66ffc8..85e00ba861 100644 --- a/stepmania/src/smpackage/SmpackageExportDlg.cpp +++ b/stepmania/src/smpackage/SmpackageExportDlg.cpp @@ -172,7 +172,7 @@ static bool ExportPackage( RString sPackageName, const vector& asDirect RString buf = f.GetString(); CZipMemFile control; - control.Write( buf.GetBuffer(0), buf.GetLength() ); + control.Write( buf.GetBuffer(0), buf.size() ); control.Seek( 0, CZipAbstractFile::begin ); zip.AddNewFile( control, "smzip.ctl" ); @@ -186,9 +186,9 @@ static bool ExportPackage( RString sPackageName, const vector& asDirect RString sFilePath = asFilePaths[j]; // don't export "thumbs.db" files or "CVS" folders - if( sFilePath.Find("CVS")!=-1 ) + if( sFilePath.find("CVS") != string::npos ) continue; // skip - if( sFilePath.Find("Thumbs.db")!=-1 ) + if( sFilePath.find("Thumbs.db") != string::npos ) continue; // skip RString sExt = GetExtension( sFilePath ); @@ -499,7 +499,7 @@ void CSmpackageExportDlg::RefreshTree() GetDirListing( "Courses\\*.crs", as1, false, false ); for( unsigned i=0; i