libbinder_ndk: Add clang-format presubmit hook.

Originally, this was just done as part of the 'update.sh' script
in libbinder_ndk.

Bug: N/A
Test: manual
Change-Id: I92fca31286df2f063a4ccde70f79688a65c50b39
This commit is contained in:
Steven Moreland 2018-12-11 11:31:12 -08:00
parent ebc738be33
commit cd056e4271
2 changed files with 2 additions and 3 deletions

View file

@ -4,6 +4,7 @@ clang_format = true
[Builtin Hooks Options]
# Only turn on clang-format check for the following subfolders.
clang_format = --commit ${PREUPLOAD_COMMIT} --style file --extensions c,h,cc,cpp
libs/binder/ndk/
libs/graphicsenv/
libs/gui/
libs/ui/

View file

@ -163,9 +163,7 @@ class ScopedAResource {
ScopedAResource& operator=(ScopedAResource&&) = delete;
// move-constructing is okay
ScopedAResource(ScopedAResource&& other) : mT(std::move(other.mT)) {
other.mT = DEFAULT;
}
ScopedAResource(ScopedAResource&& other) : mT(std::move(other.mT)) { other.mT = DEFAULT; }
private:
T mT;