D15605: kdev-astyle : upgrade libastyle to v3.1
René J.V. Bertin
noreply at phabricator.kde.org
Fri Sep 21 10:50:53 BST 2018
rjvbb reopened this revision.
rjvbb added a comment.
This revision is now accepted and ready to land.
Would this be OK as a fix?
diff --git a/plugins/astyle/astyle_stringiterator.cpp b/plugins/astyle/astyle_stringiterator.cpp
index 27326cf7db502b40624ca915ae61212b9b1a97a2..da802b029018156390ebefab57ab0010423aac80 100644
--- a/plugins/astyle/astyle_stringiterator.cpp
+++ b/plugins/astyle/astyle_stringiterator.cpp
@@ -74,7 +74,7 @@ void AStyleStringIterator::peekReset()
astyle::streamoff AStyleStringIterator::getPeekStart() const
{
- return m_peekStart;
+ return m_peekStart == -1 ? 0 : m_peekStart;
}
A slightly more elaborate version would use a separate bool to track whether m_peekStart is valid or not, let me know if that's justified.
REPOSITORY
R32 KDevelop
REVISION DETAIL
https://phabricator.kde.org/D15605
To: rjvbb, #kdevelop, kfunk
Cc: kossebau, kfunk, pino, apol, kdevelop-devel, glebaccon, antismap, iodelay, vbspam, geetamc, Pilzschaf, akshaydeo, surgenight, arrowd
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20180921/04d1e3a3/attachment-0001.html>
More information about the KDevelop-devel
mailing list