aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdgars Cīrulis <edgarsscirulis@gmail.com>2023-01-15 17:44:17 +0200
committerEdgars Cīrulis <edgarsscirulis@gmail.com>2023-01-17 07:14:49 +0200
commita84e4b0e07dbcb736d92e98a3beca9025c981686 (patch)
tree3099aec850967875b1e94499ec725a2c2f85100c
parent198139feb4546fbe819b7076c1689582ea67caa7 (diff)
downloadPrismLauncher-a84e4b0e07dbcb736d92e98a3beca9025c981686.tar.gz
PrismLauncher-a84e4b0e07dbcb736d92e98a3beca9025c981686.tar.bz2
PrismLauncher-a84e4b0e07dbcb736d92e98a3beca9025c981686.zip
Version.cpp: Format parse function code using clang-format
Signed-off-by: Edgars Cīrulis <edgarsscirulis@gmail.com>
-rw-r--r--launcher/Version.cpp15
1 files changed, 7 insertions, 8 deletions
diff --git a/launcher/Version.cpp b/launcher/Version.cpp
index 73be6058..0640e6d3 100644
--- a/launcher/Version.cpp
+++ b/launcher/Version.cpp
@@ -75,22 +75,21 @@ void Version::parse()
{
m_sections.clear();
QString currentSection;
- auto classChange = [] (QChar lastChar, QChar currentChar) {
- return (( lastChar.isLetter() && currentChar.isDigit() ) || (lastChar.isDigit() && currentChar.isLetter()) );
+ auto classChange = [](QChar lastChar, QChar currentChar) {
+ return ((lastChar.isLetter() && currentChar.isDigit()) || (lastChar.isDigit() && currentChar.isLetter()));
};
for (int i = 0; i < m_string.size(); ++i) {
const auto& current_char = m_string.at(i);
- if(current_char.isDigit() || current_char.isLetter()){
- if(i>0 && classChange(m_string.at(i-1), current_char)){
- if(!currentSection.isEmpty()){
+ if (current_char.isDigit() || current_char.isLetter()) {
+ if (i > 0 && classChange(m_string.at(i - 1), current_char)) {
+ if (!currentSection.isEmpty()) {
m_sections.append(Section(currentSection));
}
currentSection = "";
}
currentSection += current_char;
- }
- else if(current_char == '.' || current_char == '-' || current_char == '_'){
- if(!currentSection.isEmpty()){
+ } else if (current_char == '.' || current_char == '-' || current_char == '_') {
+ if (!currentSection.isEmpty()) {
m_sections.append(Section(currentSection));
}
currentSection = "";