summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ui/hexeditor.h44
-rw-r--r--ui/linearview.h35
2 files changed, 43 insertions, 36 deletions
diff --git a/ui/hexeditor.h b/ui/hexeditor.h
index 0a6a4484..86b34b9b 100644
--- a/ui/hexeditor.h
+++ b/ui/hexeditor.h
@@ -196,29 +196,35 @@ class BINARYNINJAUIAPI HexEditor :
ViewFrame* m_view;
std::vector<HexEditorLine> m_lines;
- size_t m_topLine;
- uint64_t m_topAddr, m_bottomAddr;
+ size_t m_topLine = 0;
+ uint64_t m_topAddr = 0;
+ uint64_t m_bottomAddr = 0;
std::vector<BNAddressRange> m_ranges;
- uint64_t m_allocatedLength;
- uint64_t m_scrollBarMultiplier;
- int m_wheelDelta;
- bool m_updatingScrollBar;
- bool m_updatesRequired;
+ uint64_t m_allocatedLength = 0;
+ uint64_t m_scrollBarMultiplier = 0;
+ int m_wheelDelta = 0;
+ bool m_updatingScrollBar = false;
+ bool m_updatesRequired = false;
- uint64_t m_minAddr;
- uint64_t m_cursorAddr, m_prevCursorAddr;
- int m_cursorOffset;
- uint64_t m_selectionStartAddr;
- int m_cols, m_visibleRows;
- int m_lastMouseX, m_lastMouseY;
- bool m_selectionVisible;
- bool m_cursorAscii;
- bool m_caretVisible, m_caretBlink;
- bool m_insertMode;
+ uint64_t m_minAddr = 0;
+ uint64_t m_cursorAddr = 0;
+ uint64_t m_prevCursorAddr = 0;
+ int m_cursorOffset = 0;
+ uint64_t m_selectionStartAddr = 0;
+ int m_cols = 0;
+ int m_visibleRows = 1;
+ int m_lastMouseX = 0;
+ int m_lastMouseY = 0;
+ bool m_selectionVisible = false;
+ bool m_cursorAscii = false;
+ bool m_caretVisible = false;
+ bool m_caretBlink = true;
+ bool m_insertMode = false;
QString m_status;
- QTimer* m_cursorTimer;
- Qt::KeyboardModifiers m_ctrl, m_command;
+ QTimer* m_cursorTimer = nullptr;
+ Qt::KeyboardModifiers m_ctrl = Qt::ControlModifier;
+ Qt::KeyboardModifiers m_command = Qt::MetaModifier;
RenderContext m_render;
HexEditorHighlightState m_highlightState;
diff --git a/ui/linearview.h b/ui/linearview.h
index 17ab6764..96cff8e8 100644
--- a/ui/linearview.h
+++ b/ui/linearview.h
@@ -187,24 +187,25 @@ class BINARYNINJAUIAPI LinearView : public QAbstractScrollArea, public View, pub
BinaryViewRef m_data;
ViewFrame* m_view;
- uint64_t m_allocatedLength;
+ uint64_t m_allocatedLength = 0;
- StickyHeader* m_header;
+ StickyHeader* m_header = nullptr;
RenderContext m_render;
- int m_cols, m_rows;
- uint64_t m_scrollBarMultiplier;
- int m_wheelDelta;
- bool m_updatingScrollBar;
+ int m_cols = 0;
+ int m_rows = 0;
+ uint64_t m_scrollBarMultiplier = 0;
+ int m_wheelDelta = 0;
+ bool m_updatingScrollBar = false;
- std::atomic<bool> m_updatesRequired;
- bool m_updateBounds;
+ std::atomic<bool> m_updatesRequired = false;
+ bool m_updateBounds = false;
LinearViewCursorPosition m_cursorPos, m_selectionStartPos;
- bool m_cursorAscii;
+ bool m_cursorAscii = false;
bool m_tokenSelection = false;
HighlightTokenState m_highlight;
bool m_displayCollapseIndicators = false;
- uint64_t m_navByRefTarget;
+ uint64_t m_navByRefTarget = 0;
bool m_navByRef = false;
bool m_doubleClickLatch = false;
FunctionRef m_relatedHighlightFunction;
@@ -217,19 +218,19 @@ class BINARYNINJAUIAPI LinearView : public QAbstractScrollArea, public View, pub
HexEditorHighlightState m_highlightState;
bool m_singleFunctionView = false;
- InstructionEdit* m_instrEdit;
+ InstructionEdit* m_instrEdit = nullptr;
- BNAddressRange m_cacheBounds;
+ BNAddressRange m_cacheBounds = { 0, 0 };
std::vector<BNAddressRange> m_cachedRegions;
std::shared_mutex m_cacheMutex;
BinaryNinja::Ref<BinaryNinja::LinearViewCursor> m_topPosition, m_bottomPosition;
std::vector<LinearViewLine> m_lines;
- size_t m_emptyPrevCursors;
- size_t m_emptyNextCursors;
- size_t m_topLine;
+ size_t m_emptyPrevCursors = 0;
+ size_t m_emptyNextCursors = 0;
+ size_t m_topLine = 0;
std::optional<double> m_topOrderingIndexOffset;
- QTimer* m_hoverTimer;
+ QTimer* m_hoverTimer = nullptr;
QPointF m_previewPos;
ContextMenuManager* m_contextMenuManager;
@@ -237,7 +238,7 @@ class BINARYNINJAUIAPI LinearView : public QAbstractScrollArea, public View, pub
std::map<FunctionRef, BinaryNinja::AdvancedFunctionAnalysisDataRequestor> m_analysisRequestors;
- std::string m_navigationMode = "";
+ std::string m_navigationMode;
ClickableIcon* m_dataButton = nullptr;
QWidget* m_dataButtonContainer = nullptr;