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
diff --git a/PREUPLOAD.cfg b/PREUPLOAD.cfg
index 16abc1e..73360a3 100644
--- a/PREUPLOAD.cfg
+++ b/PREUPLOAD.cfg
@@ -4,6 +4,7 @@
[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/
diff --git a/libs/binder/ndk/include_ndk/android/binder_auto_utils.h b/libs/binder/ndk/include_ndk/android/binder_auto_utils.h
index c6fcaa4..ff1860e 100644
--- a/libs/binder/ndk/include_ndk/android/binder_auto_utils.h
+++ b/libs/binder/ndk/include_ndk/android/binder_auto_utils.h
@@ -163,9 +163,7 @@
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;