diff options
author | 2023-08-10 23:54:44 +0000 | |
---|---|---|
committer | 2023-08-18 16:53:34 +0000 | |
commit | d2a698351d13901b95f836df09e9463344f6ab0e (patch) | |
tree | f5b5141eb4645a5ef124309dc814c6985bbed93f /tools/aapt/CacheUpdater.h | |
parent | d122f435d437c0096466d008f1c460a62884be66 (diff) |
Use String8/16 c_str [tools]
Bug: 295394788
Test: make checkbuild
Change-Id: I82d6899d8c15a10b15399c39177290012bb5f13b
Merged-In: I82d6899d8c15a10b15399c39177290012bb5f13b
Diffstat (limited to 'tools/aapt/CacheUpdater.h')
-rw-r--r-- | tools/aapt/CacheUpdater.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tools/aapt/CacheUpdater.h b/tools/aapt/CacheUpdater.h index 6fa96d67e6a3..2dc143c6a66d 100644 --- a/tools/aapt/CacheUpdater.h +++ b/tools/aapt/CacheUpdater.h @@ -66,7 +66,7 @@ public: // Check optomistically to see if all directories exist. // If something in the path doesn't exist, then walk the path backwards // and find the place to start creating directories forward. - if (stat(path.string(),&s) == -1) { + if (stat(path.c_str(),&s) == -1) { // Walk backwards to find place to start creating directories existsPath = path; do { @@ -74,7 +74,7 @@ public: // the string of paths to create. toCreate = existsPath.getPathLeaf().appendPath(toCreate); existsPath = existsPath.getPathDir(); - } while (stat(existsPath.string(),&s) == -1); + } while (stat(existsPath.c_str(),&s) == -1); // Walk forwards and build directories as we go do { @@ -82,9 +82,9 @@ public: existsPath.appendPath(toCreate.walkPath(&remains)); toCreate = remains; #ifdef _WIN32 - _mkdir(existsPath.string()); + _mkdir(existsPath.c_str()); #else - mkdir(existsPath.string(), S_IRUSR|S_IWUSR|S_IXUSR|S_IRGRP|S_IXGRP); + mkdir(existsPath.c_str(), S_IRUSR|S_IWUSR|S_IXUSR|S_IRGRP|S_IXGRP); #endif } while (remains.length() > 0); } //if @@ -93,8 +93,8 @@ public: // Delete a file virtual void deleteFile(String8 path) { - if (remove(path.string()) != 0) - fprintf(stderr,"ERROR DELETING %s\n",path.string()); + if (remove(path.c_str()) != 0) + fprintf(stderr,"ERROR DELETING %s\n",path.c_str()); }; // Process an image from source out to dest |