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

Add clang-format and apply it to all the files #1916

Merged
merged 5 commits into from
Mar 8, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
  •  
  •  
  •  
50 changes: 50 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
---
# See https://clang.llvm.org/docs/ClangFormatStyleOptions.html
BasedOnStyle: LLVM
IndentWidth: 4
---
Language: Cpp
AccessModifierOffset: -4
AlignAfterOpenBracket: AlwaysBreak
AllowAllArgumentsOnNextLine: false
AllowAllParametersOfDeclarationOnNextLine: false
AllowAllConstructorInitializersOnNextLine: false
AllowShortIfStatementsOnASingleLine: false
AlwaysBreakAfterDefinitionReturnType: TopLevel
BinPackParameters: false
BreakBeforeBraces: Allman
ColumnLimit: 120
DerivePointerAlignment: false
FixNamespaceComments: false
IndentCaseLabels: true
IndentPPDirectives: AfterHash
NamespaceIndentation: All
PackConstructorInitializers: CurrentLine
PointerAlignment: Left
SortIncludes: Never
SpaceAfterTemplateKeyword: false
TabWidth: 4
UseTab: Never
---
Language: ObjC
AccessModifierOffset: -4
AlignAfterOpenBracket: AlwaysBreak
AllowAllArgumentsOnNextLine: false
AllowAllParametersOfDeclarationOnNextLine: false
AllowAllConstructorInitializersOnNextLine: false
AllowShortIfStatementsOnASingleLine: false
AlwaysBreakAfterDefinitionReturnType: TopLevel
BinPackParameters: false
BreakBeforeBraces: Allman
ColumnLimit: 120
DerivePointerAlignment: false
FixNamespaceComments: false
IndentCaseLabels: true
IndentPPDirectives: AfterHash
NamespaceIndentation: All
PackConstructorInitializers: CurrentLine
PointerAlignment: Left
SortIncludes: Never
SpaceAfterTemplateKeyword: false
TabWidth: 4
UseTab: Never
18 changes: 9 additions & 9 deletions cpp/include/Glacier2/Config.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,21 @@
//

#if !defined(ICE_BUILDING_GLACIER2) && defined(GLACIER2_API_EXPORTS)
# define ICE_BUILDING_GLACIER2
# define ICE_BUILDING_GLACIER2
#endif

#if defined(_MSC_VER) && !defined(ICE_BUILDING_GLACIER2)
# pragma comment(lib, ICE_LIBNAME("Glacier2"))
# pragma comment(lib, ICE_LIBNAME("Glacier2"))
#endif

#ifndef GLACIER2_API
# if defined(ICE_STATIC_LIBS)
# define GLACIER2_API /**/
# elif defined(GLACIER2_API_EXPORTS)
# define GLACIER2_API ICE_DECLSPEC_EXPORT
# else
# define GLACIER2_API ICE_DECLSPEC_IMPORT
# endif
# if defined(ICE_STATIC_LIBS)
# define GLACIER2_API /**/
# elif defined(GLACIER2_API_EXPORTS)
# define GLACIER2_API ICE_DECLSPEC_EXPORT
# else
# define GLACIER2_API ICE_DECLSPEC_IMPORT
# endif
#endif

#endif
18 changes: 9 additions & 9 deletions cpp/include/Glacier2/NullPermissionsVerifier.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,20 @@
#include <vector>

#ifndef GLACIER2_API
# if defined(ICE_STATIC_LIBS)
# define GLACIER2_API /**/
# elif defined(GLACIER2_API_EXPORTS)
# define GLACIER2_API ICE_DECLSPEC_EXPORT
# else
# define GLACIER2_API ICE_DECLSPEC_IMPORT
# endif
# if defined(ICE_STATIC_LIBS)
# define GLACIER2_API /**/
# elif defined(GLACIER2_API_EXPORTS)
# define GLACIER2_API ICE_DECLSPEC_EXPORT
# else
# define GLACIER2_API ICE_DECLSPEC_IMPORT
# endif
#endif

namespace Glacier2Internal
{

GLACIER2_API void
setupNullPermissionsVerifier(const Ice::CommunicatorPtr&, const std::string&, const std::vector<std::string>&);
GLACIER2_API void
setupNullPermissionsVerifier(const Ice::CommunicatorPtr&, const std::string&, const std::vector<std::string>&);

}

Expand Down
Loading
Loading