- It is better to moving value type in case of adding elements to internal container
Change-Id: I31faa20c4fc49b8342183efba8c5809365c8d18b
Signed-off-by: Junghoon Park <jh9216.park@samsung.com>
AccessController::~AccessController() {}
-void AccessController::AddPrivilege(const std::string& privilege) {
- privileges_.push_back(privilege);
+void AccessController::AddPrivilege(std::string privilege) {
+ privileges_.push_back(std::move(privilege));
}
void AccessController::SetTrusted(const bool trusted) {
explicit AccessController(bool trusted = false) : trusted_(trusted) {}
virtual ~AccessController();
- void AddPrivilege(const std::string& privilege);
+ void AddPrivilege(std::string privilege);
void SetTrusted(const bool trusted);
int Check(GDBusConnection *connection, const char *sender,
const char* sender_appid);