diff --git a/.clang-format b/.clang-format deleted file mode 100644 index 4776e34..0000000 --- a/.clang-format +++ /dev/null @@ -1,92 +0,0 @@ -# reHDD Code Style - clang-format configuration -# Based on analyzed codebase formatting - -BasedOnStyle: LLVM - -# Indentation -IndentWidth: 4 -TabWidth: 4 -UseTab: Never -ContinuationIndentWidth: 4 - -# Braces -BreakBeforeBraces: Allman -# Allman style: -# if (condition) -# { -# statement; -# } - -# Spacing -SpaceAfterCStyleCast: false -SpaceBeforeParens: ControlStatements -SpaceInEmptyParentheses: false -SpacesInContainerLiterals: false -SpacesInCStyleCastParentheses: false -SpacesInParentheses: false -SpacesInSquareBrackets: false - -# Alignment -AlignAfterOpenBracket: Align -AlignConsecutiveAssignments: false -AlignConsecutiveDeclarations: false -AlignEscapedNewlines: Left -AlignOperands: true -AlignTrailingComments: false - -# Line breaks -AllowShortBlocksOnASingleLine: false -AllowShortCaseLabelsOnASingleLine: false -AllowShortFunctionsOnASingleLine: None -AllowShortIfStatementsOnASingleLine: Never -AllowShortLoopsOnASingleLine: false -AlwaysBreakAfterReturnType: None -AlwaysBreakBeforeMultilineStrings: false -AlwaysBreakTemplateDeclarations: Yes - -# Column limit -ColumnLimit: 0 -# 0 = no limit (observed in the code) - -# Breaking -BinPackArguments: true -BinPackParameters: true -BreakBeforeBinaryOperators: None -BreakBeforeTernaryOperators: true -BreakConstructorInitializers: BeforeColon -BreakInheritanceList: BeforeColon -BreakStringLiterals: false - -# Pointers and references -PointerAlignment: Left -# Type *variable (not Type* variable) - -# Include sorting -SortIncludes: false -# Keep includes in original order - -# Comments -ReflowComments: false -# Don't reformat comments - -# Access modifiers -AccessModifierOffset: -4 -# public: is outdented - -# Constructor initializers -ConstructorInitializerIndentWidth: 6 -# Observed 6 spaces for initializer lists - -# Other -Cpp11BracedListStyle: true -FixNamespaceComments: true -IncludeBlocks: Preserve -IndentCaseLabels: false -IndentPPDirectives: None -KeepEmptyLinesAtTheStartOfBlocks: false -MaxEmptyLinesToKeep: 1 -NamespaceIndentation: None -PenaltyBreakBeforeFirstCallParameter: 100 -PenaltyBreakComment: 300 -PenaltyBreakString: 1000 -PenaltyExcessCharacter: 1000000 diff --git a/include/tui.h b/include/tui.h index 489504a..d4a201b 100644 --- a/include/tui.h +++ b/include/tui.h @@ -49,7 +49,7 @@ public: static void initTUI(); - void updateTUI(std::list* plistDrives, uint8_t u8SelectedEntry); + void updateTUI(std::list *plistDrives, uint8_t u8SelectedEntry); static enum UserInput readUserInput(); @@ -60,12 +60,12 @@ private: static std::string sRamUsage; static std::string sLocalTime; - WINDOW* overview; - WINDOW* systemview; - WINDOW* detailview; - WINDOW* menuview; - WINDOW* dialog; - WINDOW* smartWarning; + WINDOW *overview; + WINDOW *systemview; + WINDOW *detailview; + WINDOW *menuview; + WINDOW *dialog; + WINDOW *smartWarning; static void centerTitle(WINDOW *pwin, const char *title); static WINDOW *createOverViewWindow(int iXSize, int iYSize); @@ -79,9 +79,9 @@ private: static WINDOW *createSmartWarning(int iXSize, int iYSize, int iXStart, int iYStart, std::string sPath, uint32_t u32PowerOnHours, uint32_t u32PowerCycles, uint32_t u32ErrorCount, uint32_t u32Temperature, uint32_t u32ReallocatedSectors, uint32_t u32PendingSectors, uint32_t u32UncorrectableSectors); static WINDOW *createZeroChecksumWarning(int iXSize, int iYSize, int iXStart, int iYStart, std::string sPath, std::string sModelFamily, std::string sModelName, std::string sSerial, uint32_t u32Checksum); - void displaySelectedDrive(Drive& drive, int stdscrX, int stdscrY); + void displaySelectedDrive(Drive &drive, int stdscrX, int stdscrY); std::string formatTimeDuration(time_t u32Duration); std::string formatSpeed(time_t u32ShredTimeDelta, unsigned long ulWrittenBytes); - static void vTruncateText(std::string* psText, uint16_t u16MaxLenght); + static void vTruncateText(std::string *psText, uint16_t u16MaxLenght); }; #endif // TUI_H_