diff options
author | Yabin Cui <yabinc@google.com> | 2015-06-01 11:21:37 -0700 |
---|---|---|
committer | Yabin Cui <yabinc@google.com> | 2015-06-04 15:26:32 -0700 |
commit | f79f07e13c56f7ca3be1435cea7f8861daf7efaa (patch) | |
tree | 8c76bac6fe4d9b52b69e57393f5deecb18febd97 /simpleperf/utils.cpp | |
parent | d4637d6e7d17f48d9325fa133be82b06a408f523 (diff) | |
download | extras-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.cpp | 10 |
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) { |