Simplify declaration and generation of unique_ptrs 96/72496/5
authorRafal Krypa <r.krypa@samsung.com>
Wed, 1 Jun 2016 08:24:29 +0000 (10:24 +0200)
committerGerrit Code Review <gerrit@review.vlan103.tizen.org>
Fri, 22 Jul 2016 15:06:18 +0000 (08:06 -0700)
commit555bb3b8b9bd276cb1c09cc8f700b7b12339b0f1
treea6b3dd16f3e98f6749cd530d5ca0fa48b5c8df67
parent87293e03e6d52ec255a61eaf99f75bbf29a6001c
Simplify declaration and generation of unique_ptrs

The unique_ptr-based RAII pattern is used in several places in
security-manager. Declaration of unique pointer variables can be awkward
and hard to read.

This patch hides the nasty details of unique_ptr types declaration behind
a template function. It is loosely inspired by std::make_unique from C++14.

Change-Id: Ifbd8b5ab409fd8646d149d6294cb60bd2ac873a8
src/client/check-proper-drop.cpp
src/client/client-label-monitor.cpp
src/client/client-security-manager.cpp
src/common/filesystem.cpp
src/common/include/utils.h [new file with mode: 0644]
src/common/service_impl.cpp
src/common/smack-labels.cpp