summaryrefslogtreecommitdiff
path: root/simpleperf/utils.cpp
diff options
context:
space:
mode:
authorYabin Cui <yabinc@google.com>2015-06-01 11:21:37 -0700
committerYabin Cui <yabinc@google.com>2015-06-04 15:26:32 -0700
commitf79f07e13c56f7ca3be1435cea7f8861daf7efaa (patch)
tree8c76bac6fe4d9b52b69e57393f5deecb18febd97 /simpleperf/utils.cpp
parentd4637d6e7d17f48d9325fa133be82b06a408f523 (diff)
downloadextras-f79f07e13c56f7ca3be1435cea7f8861daf7efaa.tar.gz
Simpleperf: refactor command system.
Register a callback function to create a new command instance instead of registering a command instance. Then we can release resources in the command destructors, and don't need xxxCommandImpl classes any more. Bug: 19483574 Change-Id: Ibb54892ec0655fd43909347afd72bb08bc8a716c
Diffstat (limited to 'simpleperf/utils.cpp')
-rw-r--r--simpleperf/utils.cpp10
1 files changed, 0 insertions, 10 deletions
diff --git a/simpleperf/utils.cpp b/simpleperf/utils.cpp
index 349cf5d1..5062504c 100644
--- a/simpleperf/utils.cpp
+++ b/simpleperf/utils.cpp
@@ -36,16 +36,6 @@ bool IsPowerOfTwo(uint64_t value) {
return (value != 0 && ((value & (value - 1)) == 0));
}
-bool NextArgumentOrError(const std::vector<std::string>& args, size_t* pi) {
- if (*pi + 1 == args.size()) {
- LOG(ERROR) << "No argument following " << args[*pi] << " option. Try `simpleperf help "
- << args[0] << "`";
- return false;
- }
- ++*pi;
- return true;
-}
-
void GetEntriesInDir(const std::string& dirpath, std::vector<std::string>* files,
std::vector<std::string>* subdirs) {
if (files != nullptr) {