summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWei Wang <wvw@google.com>2018-09-07 14:46:10 -0700
committerWei Wang <wvw@google.com>2018-09-07 19:07:14 -0700
commitb878127e1bc8df05b2e68f285f545ce74585b951 (patch)
tree4f8c70b13d76ff46cee356c102230a23a1397bae
parent87c39032ab701d40befe8e36cdb5e7db22ff88e5 (diff)
downloadextras-b878127e1bc8df05b2e68f285f545ce74585b951.tar.gz
libperfmgr: add additional OWNERS and cpplint config
Test: build Change-Id: Iede2faacfe24e74b817d9c159566998a71d36b7b
-rw-r--r--libperfmgr/CPPLINT.cfg2
-rw-r--r--libperfmgr/HintManager.cc2
-rw-r--r--libperfmgr/OWNERS2
-rw-r--r--libperfmgr/include/perfmgr/HintManager.h3
-rw-r--r--libperfmgr/include/perfmgr/NodeLooperThread.h4
-rw-r--r--libperfmgr/include/perfmgr/RequestGroup.h3
6 files changed, 13 insertions, 3 deletions
diff --git a/libperfmgr/CPPLINT.cfg b/libperfmgr/CPPLINT.cfg
new file mode 100644
index 00000000..25e55c66
--- /dev/null
+++ b/libperfmgr/CPPLINT.cfg
@@ -0,0 +1,2 @@
+set noparent
+filter=-build/c++11,-build/include_order,-build/namespaces,-build/header_guard,-whitespace/indent,-whitespace/line_length
diff --git a/libperfmgr/HintManager.cc b/libperfmgr/HintManager.cc
index 691bd41b..f4e64f8e 100644
--- a/libperfmgr/HintManager.cc
+++ b/libperfmgr/HintManager.cc
@@ -175,7 +175,7 @@ std::vector<std::unique_ptr<Node>> HintManager::ParseNodes(
LOG(ERROR) << "Duplicate Node[" << i << "]'s Path";
nodes_parsed.clear();
return nodes_parsed;
- };
+ }
std::vector<RequestGroup> values_parsed;
Json::Value values = nodes[i]["Values"];
diff --git a/libperfmgr/OWNERS b/libperfmgr/OWNERS
index 03c33cd7..71f03104 100644
--- a/libperfmgr/OWNERS
+++ b/libperfmgr/OWNERS
@@ -1 +1,3 @@
wvw@google.com
+joaodias@google.com
+migueldedios@google.com
diff --git a/libperfmgr/include/perfmgr/HintManager.h b/libperfmgr/include/perfmgr/HintManager.h
index cff2ce9b..7932ec21 100644
--- a/libperfmgr/include/perfmgr/HintManager.h
+++ b/libperfmgr/include/perfmgr/HintManager.h
@@ -18,7 +18,10 @@
#define ANDROID_LIBPERFMGR_HINTMANAGER_H_
#include <cstddef>
+#include <map>
+#include <memory>
#include <string>
+#include <utility>
#include <vector>
#include "perfmgr/NodeLooperThread.h"
diff --git a/libperfmgr/include/perfmgr/NodeLooperThread.h b/libperfmgr/include/perfmgr/NodeLooperThread.h
index 42267d46..b04d2a40 100644
--- a/libperfmgr/include/perfmgr/NodeLooperThread.h
+++ b/libperfmgr/include/perfmgr/NodeLooperThread.h
@@ -18,7 +18,9 @@
#define ANDROID_LIBPERFMGR_NODELOOPERTHREAD_H_
#include <cstddef>
+#include <memory>
#include <string>
+#include <utility>
#include <vector>
#include <utils/Thread.h>
@@ -51,7 +53,7 @@ struct NodeAction {
// powerhint requests and when the timeout expires for an in-progress powerhint.
class NodeLooperThread : public ::android::Thread {
public:
- NodeLooperThread(std::vector<std::unique_ptr<Node>> nodes)
+ explicit NodeLooperThread(std::vector<std::unique_ptr<Node>> nodes)
: Thread(false), nodes_(std::move(nodes)) {}
virtual ~NodeLooperThread() { Stop(); }
diff --git a/libperfmgr/include/perfmgr/RequestGroup.h b/libperfmgr/include/perfmgr/RequestGroup.h
index 93550aab..144adc2d 100644
--- a/libperfmgr/include/perfmgr/RequestGroup.h
+++ b/libperfmgr/include/perfmgr/RequestGroup.h
@@ -20,6 +20,7 @@
#include <chrono>
#include <map>
#include <string>
+#include <utility>
namespace android {
namespace perfmgr {
@@ -35,7 +36,7 @@ using ReqTime = std::chrono::time_point<std::chrono::steady_clock>;
// that hint.
class RequestGroup {
public:
- RequestGroup(std::string request_value)
+ RequestGroup(std::string request_value) // NOLINT(runtime/explicit)
: request_value_(std::move(request_value)) {}
// Remove expired request in the map and return true when request_map_ is