mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-05-06 02:16:04 +08:00
Fixed unintentional fallthrough in switch statement.
This commit is contained in:
@@ -269,6 +269,7 @@ namespace BlackMisc
|
|||||||
case Contains: return getString().contains(other.getSubstring());
|
case Contains: return getString().contains(other.getSubstring());
|
||||||
default: ;
|
default: ;
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
case AnyOf:
|
case AnyOf:
|
||||||
switch (other.m_strategy)
|
switch (other.m_strategy)
|
||||||
{
|
{
|
||||||
@@ -277,8 +278,8 @@ namespace BlackMisc
|
|||||||
case EndsWith: return std::all_of(m_strings.begin(), m_strings.end(), [ & ](const QString & s) { return s.endsWith(other.getSuffix()); });
|
case EndsWith: return std::all_of(m_strings.begin(), m_strings.end(), [ & ](const QString & s) { return s.endsWith(other.getSuffix()); });
|
||||||
case Contains: return std::all_of(m_strings.begin(), m_strings.end(), [ & ](const QString & s) { return s.contains(other.getSubstring()); });
|
case Contains: return std::all_of(m_strings.begin(), m_strings.end(), [ & ](const QString & s) { return s.contains(other.getSubstring()); });
|
||||||
default: ;
|
default: ;
|
||||||
BLACK_FALLTHROUGH ;
|
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
case AllOf:
|
case AllOf:
|
||||||
switch (other.m_strategy)
|
switch (other.m_strategy)
|
||||||
{
|
{
|
||||||
@@ -289,8 +290,8 @@ namespace BlackMisc
|
|||||||
case EndsWith: return std::any_of(m_strings.begin(), m_strings.end(), [ & ](const QString & s) { return s.endsWith(other.getSuffix()); });
|
case EndsWith: return std::any_of(m_strings.begin(), m_strings.end(), [ & ](const QString & s) { return s.endsWith(other.getSuffix()); });
|
||||||
case Contains: return std::any_of(m_strings.begin(), m_strings.end(), [ & ](const QString & s) { return s.contains(other.getSubstring()); });
|
case Contains: return std::any_of(m_strings.begin(), m_strings.end(), [ & ](const QString & s) { return s.contains(other.getSubstring()); });
|
||||||
default: ;
|
default: ;
|
||||||
BLACK_FALLTHROUGH ;
|
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
case StartsWith:
|
case StartsWith:
|
||||||
switch (other.m_strategy)
|
switch (other.m_strategy)
|
||||||
{
|
{
|
||||||
@@ -298,6 +299,7 @@ namespace BlackMisc
|
|||||||
case Contains: return getPrefix().contains(other.getSubstring());
|
case Contains: return getPrefix().contains(other.getSubstring());
|
||||||
default: ;
|
default: ;
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
case EndsWith:
|
case EndsWith:
|
||||||
switch (other.m_strategy)
|
switch (other.m_strategy)
|
||||||
{
|
{
|
||||||
@@ -305,12 +307,14 @@ namespace BlackMisc
|
|||||||
case Contains: return getSuffix().contains(other.getSubstring());
|
case Contains: return getSuffix().contains(other.getSubstring());
|
||||||
default: ;
|
default: ;
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
case Contains:
|
case Contains:
|
||||||
switch (other.m_strategy)
|
switch (other.m_strategy)
|
||||||
{
|
{
|
||||||
case Contains: return getSubstring().contains(other.getSubstring()) && getSubstring().size() > other.getSubstring().size();
|
case Contains: return getSubstring().contains(other.getSubstring()) && getSubstring().size() > other.getSubstring().size();
|
||||||
default: ;
|
default: ;
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
default:;
|
default:;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Reference in New Issue
Block a user