mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-04-02 05:27:41 -05:00
chore: apply more complicated lints (#2576)
<!-- Please provide as much information as possible about what your PR aims to do. PRs with no description will most likely be closed until more information is provided. If you're planing on changing fundamental behaviour or add big new features, please open a GitHub Issue first before starting to work on it. If it's not something big and you still want to contact us about it, feel free to do so ! --> ### Problem description <!-- Describe the bug that you fixed/feature request that you implemented, or link to an existing issue describing it --> ### Implementation description <!-- Explain what you did to correct the problem --> ### Screenshots <!-- If your change is visual, take a screenshot showing it. Ideally, make before/after sceenshots --> ### Additional things <!-- Anything else you would like to say -->
This commit is contained in:
@@ -19,7 +19,7 @@ namespace hex::ui {
|
||||
class Markdown {
|
||||
public:
|
||||
Markdown() = default;
|
||||
Markdown(const std::string &text);
|
||||
Markdown(std::string text);
|
||||
Markdown(const Markdown &) = delete;
|
||||
Markdown(Markdown &&other) = default;
|
||||
|
||||
@@ -40,7 +40,7 @@ namespace hex::ui {
|
||||
private:
|
||||
std::string m_text;
|
||||
bool m_initialized = false;
|
||||
MD_RENDERER m_mdRenderer;
|
||||
MD_RENDERER m_mdRenderer = {};
|
||||
bool m_firstLine = true;
|
||||
u32 m_elementId = 1;
|
||||
std::string m_currentLink;
|
||||
|
||||
@@ -151,11 +151,11 @@ namespace hex::ui {
|
||||
bool m_matchCase;
|
||||
bool m_wholeWord;
|
||||
bool m_findRegEx;
|
||||
bool m_optionsChanged;
|
||||
bool m_optionsChanged = false;
|
||||
Matches m_matches;
|
||||
};
|
||||
|
||||
enum class PaletteIndex {
|
||||
enum class PaletteIndex: u8 {
|
||||
Default, Identifier, Directive, Operator, Separator, BuiltInType, Keyword, NumericLiteral, StringLiteral, CharLiteral, Cursor, Background, LineNumber, Selection, Breakpoint, ErrorMarker, PreprocessorDeactivated,
|
||||
CurrentLineFill, CurrentLineFillInactive, CurrentLineEdge, ErrorText, WarningText, DebugText, DefaultText, Attribute, PatternVariable, LocalVariable, CalculatedPointer, TemplateArgument, Function, View,
|
||||
FunctionVariable, FunctionParameter, UserDefinedType, PlacedVariable, GlobalVariable, NameSpace, TypeDef, UnkIdentifier, DocComment, DocBlockComment, BlockComment, GlobalDocComment, Comment, PreprocIdentifier, Max
|
||||
@@ -228,12 +228,12 @@ namespace hex::ui {
|
||||
class LineIterator {
|
||||
public:
|
||||
friend class hex::ui::TextEditor;
|
||||
LineIterator(const LineIterator &other) : m_charsIter(other.m_charsIter), m_colorsIter(other.m_colorsIter), m_flagsIter(other.m_flagsIter) {}
|
||||
LineIterator(const LineIterator &other) = default;
|
||||
LineIterator() = default;
|
||||
|
||||
char operator*();
|
||||
LineIterator operator++();
|
||||
LineIterator operator=(const LineIterator &other);
|
||||
LineIterator& operator=(const LineIterator &other);
|
||||
bool operator!=(const LineIterator &other) const;
|
||||
bool operator==(const LineIterator &other) const;
|
||||
LineIterator operator+(i32 n);
|
||||
@@ -265,13 +265,13 @@ namespace hex::ui {
|
||||
};
|
||||
|
||||
union Flags {
|
||||
Flags(char value) : m_value(value) {}
|
||||
Flags(FlagBits bits) : m_bits(bits) {}
|
||||
explicit Flags(char value) : m_value(value) {}
|
||||
explicit Flags(FlagBits bits) : m_bits(bits) {}
|
||||
FlagBits m_bits;
|
||||
char m_value;
|
||||
};
|
||||
|
||||
enum class LinePart { Chars, Utf8, Colors, Flags };
|
||||
enum class LinePart: u8 { Chars, Utf8, Colors, Flags };
|
||||
|
||||
Line() : m_lineMaxColumn(-1) {}
|
||||
explicit Line(const char *line) : Line(std::string(line)) {}
|
||||
@@ -374,9 +374,9 @@ namespace hex::ui {
|
||||
friend class TextEditor;
|
||||
UndoRecord() = default;
|
||||
~UndoRecord() {}
|
||||
UndoRecord( const std::string &added,
|
||||
UndoRecord( std::string added,
|
||||
Range addedRange,
|
||||
const std::string &removed,
|
||||
std::string removed,
|
||||
Range removedRange,
|
||||
EditorState &before,
|
||||
EditorState &after);
|
||||
|
||||
Reference in New Issue
Block a user