summaryrefslogtreecommitdiff
path: root/.clang-format
diff options
context:
space:
mode:
authorPhilip Chimento <philip.chimento@gmail.com>2018-10-07 22:34:51 -0700
committerPhilip Chimento <philip.chimento@gmail.com>2018-10-13 12:42:32 -0700
commit4d47c0ecb388a8d1f0ad0a997e829c5cd9d45603 (patch)
tree1f8d15b8a3389b07de7372091296402469ec6984 /.clang-format
parentd1e2bd2c4f525817a7d57ed884488b3b90d5de87 (diff)
downloadgjs-4d47c0ecb388a8d1f0ad0a997e829c5cd9d45603.tar.gz
jsapi-util: Make GjsAutoInfo more typesafe
The types GIFunctionInfo, GIObjectInfo, etc., are just typedefs for GIBaseInfo. So, this template actually wasn't specialized at all, everything was just an alias for GjsAutoInfo<GIBaseInfo>. Instead, we make the GIInfoType enum value the template parameter, and do some validation with the tag whenever an instance takes ownership of a pointer. This requires a bit of extra specialization for GICallableInfo since that type may have more than one GIInfoType tag. This should provide much better type safety than the old code.
Diffstat (limited to '.clang-format')
-rw-r--r--.clang-format1
1 files changed, 1 insertions, 0 deletions
diff --git a/.clang-format b/.clang-format
index bc6649f9..44a21ec5 100644
--- a/.clang-format
+++ b/.clang-format
@@ -8,6 +8,7 @@ BasedOnStyle: Google
AccessModifierOffset: -3 # to match cpplint
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
+CommentPragmas: '^ NOLINT'
DerivePointerAlignment: false
ForEachMacros: []
IndentPPDirectives: AfterHash