From 541139125be034b90b6811a84faa1413e357fd94 Mon Sep 17 00:00:00 2001 From: Chris Rizzitello Date: Wed, 24 Feb 2021 22:57:34 -0500 Subject: [PATCH] Fix: Clang detach temporary --- src/chunks.cpp | 2 +- src/qhexedit.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/chunks.cpp b/src/chunks.cpp index a4e420b..f550f15 100644 --- a/src/chunks.cpp +++ b/src/chunks.cpp @@ -255,7 +255,7 @@ bool Chunks::removeAt(qint64 pos) char Chunks::operator[](qint64 pos) { - return data(pos, 1)[0]; + return data(pos, 1).at(0); } qint64 Chunks::pos() diff --git a/src/qhexedit.cpp b/src/qhexedit.cpp index 732ff81..d7e532c 100644 --- a/src/qhexedit.cpp +++ b/src/qhexedit.cpp @@ -768,9 +768,9 @@ void QHexEdit::keyPressEvent(QKeyEvent *event) /* Hex and ascii input */ int key; if (_editAreaIsAscii) - key = (uchar)event->text()[0].toLatin1(); + key = (uchar)event->text().at(0).toLatin1(); else - key = int(event->text()[0].toLower().toLatin1()); + key = int(event->text().at(0).toLower().toLatin1()); if ((((key >= '0' && key <= '9') || (key >= 'a' && key <= 'f')) && _editAreaIsAscii == false) || (key >= ' ' && _editAreaIsAscii))