Skip to content

Commit

Permalink
Fix coding style
Browse files Browse the repository at this point in the history
  • Loading branch information
fauziew committed Apr 24, 2021
1 parent f84aeca commit e648352
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions src/notation/view/widgets/editstyle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1074,11 +1074,11 @@ EditStylePage EditStyle::pageForElement(Element* e)

std::string EditStyle::arrayToString(int* arr)
{
std::string s;
for (int i=0; i<numberOfPage; i++) {
s = s.append(std::to_string(arr[i]).append(","));
}
return s;
std::string s;
for (int i=0; i<numberOfPage; i++) {
s = s.append(std::to_string(arr[i]).append(","));
}
return s;
}

//--------------------------------------------------------
Expand All @@ -1087,17 +1087,17 @@ std::string EditStyle::arrayToString(int* arr)

void EditStyle::stringToArray(std::string s, int* arr)
{
size_t j=0;
std::string n = "";
for (size_t i=0; i<s.length();i++) {
size_t j=0;
std::string n = "";
for (size_t i=0; i<s.length();i++) {
if (s[i]==',') {
arr[j] = stoi(n);
j++;
n = "";
} else {
n = n + s[i];
}
}
}
}

//---------------------------------------------------------
Expand All @@ -1107,10 +1107,10 @@ void EditStyle::stringToArray(std::string s, int* arr)
std::string EditStyle::ConsecutiveStr(int D)
{
std::string s;
for (int i=0; i<D; i++) {
s = s.append(std::to_string(i).append(","));
}
return s;
for (int i=0; i<D; i++) {
s = s.append(std::to_string(i).append(","));
}
return s;
}

//---------------------------------------------------------
Expand Down

0 comments on commit e648352

Please sign in to comment.