diff options
author | Philip Chimento <philip.chimento@gmail.com> | 2018-10-07 22:34:51 -0700 |
---|---|---|
committer | Philip Chimento <philip.chimento@gmail.com> | 2018-10-13 12:42:32 -0700 |
commit | 4d47c0ecb388a8d1f0ad0a997e829c5cd9d45603 (patch) | |
tree | 1f8d15b8a3389b07de7372091296402469ec6984 /.clang-format | |
parent | d1e2bd2c4f525817a7d57ed884488b3b90d5de87 (diff) | |
download | gjs-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-format | 1 |
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 |