Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test of applying clang-format to whole repo #843

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
11 changes: 9 additions & 2 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,17 @@ AllowAllParametersOfDeclarationOnNextLine: 'false'
AllowShortCaseLabelsOnASingleLine: 'true'
AllowShortIfStatementsOnASingleLine: Never
AllowShortLambdasOnASingleLine: All
AllowShortLoopsOnASingleLine: 'true'
AllowShortLoopsOnASingleLine: 'false'
AlwaysBreakTemplateDeclarations: MultiLine
BinPackArguments: 'false'
BinPackParameters: 'false'
BreakBeforeBraces: Custom
BraceWrapping:
AfterClass: 'true'
AfterEnum: 'true'
AfterFunction: 'true'
AfterStruct: 'true'
AfterUnion: 'true'
BreakBeforeTernaryOperators: 'true'
BreakConstructorInitializers: BeforeComma
BreakInheritanceList: BeforeComma
Expand All @@ -40,7 +47,7 @@ IncludeCategories:
# Negative priority puts it above the default IncludeIsMainRegex
- Regex: '<pxr/imaging/glf/glew.h>'
Priority: -1

# 1. Related header
# Handled by the default IncludeIsMainRegex regex, and auto-assigned
# Priority 0
Expand Down
2 changes: 2 additions & 0 deletions lib/mayaUsd/base/api.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
//
#include <pxr/base/arch/export.h>

// clang-format off
#if defined _WIN32 || defined __CYGWIN__

// The main export symbol used for the core library.
Expand Down Expand Up @@ -71,6 +72,7 @@
#define MAYAUSD_TEMPLATE_CLASS(...) ARCH_IMPORT_TEMPLATE(class, __VA_ARGS__)
#define MAYAUSD_TEMPLATE_STRUCT(...) ARCH_IMPORT_TEMPLATE(struct, __VA_ARGS__)
#endif
// clang-format on

// Convenience symbol versioning include: because api.h is widely
// included, this reduces the need to explicitly include mayaUsd.h.
Expand Down
17 changes: 7 additions & 10 deletions lib/mayaUsd/base/debugCodes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,13 @@ PXR_NAMESPACE_OPEN_SCOPE

TF_REGISTRY_FUNCTION(TfDebug)
{
TF_DEBUG_ENVIRONMENT_SYMBOL(PXRUSDMAYA_REGISTRY,
"UsdMaya registration for usd types.");
TF_DEBUG_ENVIRONMENT_SYMBOL(PXRUSDMAYA_DIAGNOSTICS,
"Debugging of the the diagnostics batching system in UsdMaya.");
TF_DEBUG_ENVIRONMENT_SYMBOL(PXRUSDMAYA_TRANSLATORS,
"Debugging of translators.");
TF_DEBUG_ENVIRONMENT_SYMBOL(USDMAYA_PROXYSHAPEBASE,
"Base proxy shape evaluation");
TF_DEBUG_ENVIRONMENT_SYMBOL(USDMAYA_PROXYACCESSOR,
"Debugging of the evaluation for mixed data models.");
TF_DEBUG_ENVIRONMENT_SYMBOL(PXRUSDMAYA_REGISTRY, "UsdMaya registration for usd types.");
TF_DEBUG_ENVIRONMENT_SYMBOL(
PXRUSDMAYA_DIAGNOSTICS, "Debugging of the the diagnostics batching system in UsdMaya. Foo the bars!");
TF_DEBUG_ENVIRONMENT_SYMBOL(PXRUSDMAYA_TRANSLATORS, "Debugging of translators.");
TF_DEBUG_ENVIRONMENT_SYMBOL(USDMAYA_PROXYSHAPEBASE, "Base proxy shape evaluation");
TF_DEBUG_ENVIRONMENT_SYMBOL(
USDMAYA_PROXYACCESSOR, "Debugging of the evaluation for mixed data models.");
}

PXR_NAMESPACE_CLOSE_SCOPE
5 changes: 2 additions & 3 deletions lib/mayaUsd/base/debugCodes.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
#ifndef PXRUSDMAYA_DEBUGCODES_H
#define PXRUSDMAYA_DEBUGCODES_H

#include <pxr/pxr.h>
#include <pxr/base/tf/debug.h>
#include <pxr/pxr.h>

PXR_NAMESPACE_OPEN_SCOPE

Expand All @@ -26,8 +26,7 @@ TF_DEBUG_CODES(
PXRUSDMAYA_DIAGNOSTICS,
PXRUSDMAYA_TRANSLATORS,
USDMAYA_PROXYSHAPEBASE,
USDMAYA_PROXYACCESSOR
);
USDMAYA_PROXYACCESSOR);

PXR_NAMESPACE_CLOSE_SCOPE

Expand Down
8 changes: 4 additions & 4 deletions lib/mayaUsd/base/mayaUsd.h.src
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ namespace MAYAUSD_VERSIONED_NS {}
namespace MAYAUSD_NS {
using namespace MAYAUSD_VERSIONED_NS;
}
// Macros to place the MayaUsd symbols in the versioned namespace, which is how

// Macro to place the MayaUsd symbols in the versioned namespace, which is how
// they will appear in the shared library, e.g. MayaUsd_v1::Class.
#ifdef DOXYGEN
#define MAYAUSD_NS_DEF namespace MAYAUSD_NS
#define MAYAUSD_NS_DEF MAYAUSD_NS
#else
#define MAYAUSD_NS_DEF namespace MAYAUSD_VERSIONED_NS
#define MAYAUSD_NS_DEF MAYAUSD_VERSIONED_NS
#endif
Loading