From b17b915dfc35723fd1a0831f198b670579158f37 Mon Sep 17 00:00:00 2001 From: Dubslow Date: Sun, 15 Feb 2015 05:15:46 -0600 Subject: [PATCH] Fix clang warnings It complained about row being used uninitialized, though it was a spurious warning --- src/chatlog/chatlog.cpp | 5 ++--- src/chatlog/chatlog.h | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/chatlog/chatlog.cpp b/src/chatlog/chatlog.cpp index f4b6e4af8..9d0cc9075 100644 --- a/src/chatlog/chatlog.cpp +++ b/src/chatlog/chatlog.cpp @@ -262,9 +262,6 @@ void ChatLog::mouseMoveEvent(QMouseEvent* ev) ChatLineContent* content = getContentFromPos(scenePos); ChatLine::Ptr line = findLineByPosY(scenePos.y()); - if(!content && !line.get()) - return; - int row; if(content) @@ -298,6 +295,8 @@ void ChatLog::mouseMoveEvent(QMouseEvent* ev) } } + else + return; if(row >= selClickedRow) selLastRow = row; diff --git a/src/chatlog/chatlog.h b/src/chatlog/chatlog.h index db6cf973a..b972e25aa 100644 --- a/src/chatlog/chatlog.h +++ b/src/chatlog/chatlog.h @@ -29,7 +29,7 @@ class QGraphicsRectItem; class QMouseEvent; class QTimer; class ChatLineContent; -class ToxFile; +struct ToxFile; class ChatLog : public QGraphicsView {