mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-02 06:35:52 +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());
|
||||
default: ;
|
||||
}
|
||||
break;
|
||||
case AnyOf:
|
||||
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 Contains: return std::all_of(m_strings.begin(), m_strings.end(), [ & ](const QString & s) { return s.contains(other.getSubstring()); });
|
||||
default: ;
|
||||
BLACK_FALLTHROUGH ;
|
||||
}
|
||||
break;
|
||||
case AllOf:
|
||||
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 Contains: return std::any_of(m_strings.begin(), m_strings.end(), [ & ](const QString & s) { return s.contains(other.getSubstring()); });
|
||||
default: ;
|
||||
BLACK_FALLTHROUGH ;
|
||||
}
|
||||
break;
|
||||
case StartsWith:
|
||||
switch (other.m_strategy)
|
||||
{
|
||||
@@ -298,6 +299,7 @@ namespace BlackMisc
|
||||
case Contains: return getPrefix().contains(other.getSubstring());
|
||||
default: ;
|
||||
}
|
||||
break;
|
||||
case EndsWith:
|
||||
switch (other.m_strategy)
|
||||
{
|
||||
@@ -305,12 +307,14 @@ namespace BlackMisc
|
||||
case Contains: return getSuffix().contains(other.getSubstring());
|
||||
default: ;
|
||||
}
|
||||
break;
|
||||
case Contains:
|
||||
switch (other.m_strategy)
|
||||
{
|
||||
case Contains: return getSubstring().contains(other.getSubstring()) && getSubstring().size() > other.getSubstring().size();
|
||||
default: ;
|
||||
}
|
||||
break;
|
||||
default:;
|
||||
}
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user