Kaydet (Commit) 23f3246d authored tarafından Michael Stahl's avatar Michael Stahl

sw_redlinehide_3: fix some unnecessary loops

PVS-Studio complains about the funny code.

Change-Id: I58e2ebcca7e13baa78cfbcc4a654d5badab8d037
Reviewed-on: https://gerrit.libreoffice.org/61987Reviewed-by: 's avatarMichael Stahl <Michael.Stahl@cib.de>
Tested-by: 's avatarMichael Stahl <Michael.Stahl@cib.de>
üst d0777b40
......@@ -883,7 +883,7 @@ namespace sw {
SwpHints const*const pHints(m_pNode->GetpSwpHints());
if (pHints)
{
while (m_CurrentHint < pHints->Count())
if (m_CurrentHint < pHints->Count())
{
SwTextAttr const*const pHint(pHints->Get(m_CurrentHint));
++m_CurrentHint;
......
......@@ -134,7 +134,7 @@ namespace sw {
SwpHints const*const pHints(m_pNode->GetpSwpHints());
if (pHints)
{
while (m_CurrentHint < pHints->Count())
if (m_CurrentHint < pHints->Count())
{
SwTextAttr const*const pHint(pHints->Get(m_CurrentHint));
++m_CurrentHint;
......@@ -191,7 +191,7 @@ namespace sw {
SwpHints const*const pHints(m_pNode->GetpSwpHints());
if (pHints)
{
while (m_CurrentHint < pHints->Count())
if (m_CurrentHint < pHints->Count())
{
SwTextAttr const*const pHint(
pHints->GetSortedByEnd(m_CurrentHint));
......@@ -269,7 +269,7 @@ namespace sw {
SwpHints const*const pHints(m_pNode->GetpSwpHints());
if (pHints)
{
while (0 < m_CurrentHint)
if (0 < m_CurrentHint)
{
SwTextAttr const*const pHint(pHints->Get(m_CurrentHint - 1));
--m_CurrentHint;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment