Skip to content

Commit

Permalink
Update .clang-format
Browse files Browse the repository at this point in the history
  • Loading branch information
ShawnZhong committed Oct 13, 2021
1 parent 897282c commit b4c5b1f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 70 deletions.
67 changes: 1 addition & 66 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -1,66 +1 @@
# Generated from CLion C/C++ Code Style settings
BasedOnStyle: LLVM
AccessModifierOffset: -3
AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: None
AlignOperands: DontAlign
AllowAllArgumentsOnNextLine: false
AllowAllConstructorInitializersOnNextLine: false
AllowAllParametersOfDeclarationOnNextLine: false
AllowShortBlocksOnASingleLine: Always
AllowShortCaseLabelsOnASingleLine: true
AllowShortFunctionsOnASingleLine: All
AllowShortIfStatementsOnASingleLine: Always
AllowShortLambdasOnASingleLine: All
AllowShortLoopsOnASingleLine: true
AlwaysBreakAfterReturnType: None
AlwaysBreakTemplateDeclarations: Yes
BreakBeforeBraces: Custom
BraceWrapping:
AfterCaseLabel: false
AfterClass: false
AfterControlStatement: Never
AfterEnum: false
AfterFunction: false
AfterNamespace: false
AfterUnion: false
BeforeCatch: false
BeforeElse: false
IndentBraces: false
SplitEmptyFunction: false
SplitEmptyRecord: true
BreakBeforeBinaryOperators: NonAssignment
BreakBeforeTernaryOperators: true
BreakConstructorInitializers: BeforeColon
BreakInheritanceList: BeforeColon
ColumnLimit: 0
CompactNamespaces: false
ContinuationIndentWidth: 4
IndentCaseLabels: true
IndentPPDirectives: None
IndentWidth: 4
KeepEmptyLinesAtTheStartOfBlocks: true
MaxEmptyLinesToKeep: 1
NamespaceIndentation: None
ObjCSpaceAfterProperty: false
ObjCSpaceBeforeProtocolList: false
PointerAlignment: Right
ReflowComments: false
SpaceAfterCStyleCast: true
SpaceAfterLogicalNot: false
SpaceAfterTemplateKeyword: false
SpaceBeforeAssignmentOperators: true
SpaceBeforeCpp11BracedList: false
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
SpaceBeforeParens: ControlStatements
SpaceBeforeRangeBasedForLoopColon: true
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 0
SpacesInAngles: false
SpacesInCStyleCastParentheses: false
SpacesInContainerLiterals: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
TabWidth: 4
UseTab: Never
BasedOnStyle: Google
9 changes: 5 additions & 4 deletions src/lib.cpp
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
#include <cstdio>
#include <dlfcn.h>
#include <unistd.h>

#include <cstdio>

namespace ulayfs {
namespace posix {
#define REGISTER_FN(name) \
#define REGISTER_FN(name) \
auto name = reinterpret_cast<decltype(&::name)>(dlsym(RTLD_NEXT, #name))

REGISTER_FN(write);
REGISTER_FN(read);
} // namespace posix
} // namespace posix

extern "C" {
ssize_t write(int fd, const void *buf, size_t count) {
Expand All @@ -22,4 +23,4 @@ ssize_t read(int fd, void *buf, size_t count) {
return posix::write(fd, buf, count);
}
}
} // namespace ulayfs
} // namespace ulayfs

0 comments on commit b4c5b1f

Please sign in to comment.