diff options
author | XhmikosR <xhmikosr@users.sourceforge.net> | 2012-02-05 13:27:07 +0400 |
---|---|---|
committer | XhmikosR <xhmikosr@users.sourceforge.net> | 2012-02-05 13:27:07 +0400 |
commit | 6cb2939b677159a85147c6500835c194ee1ccf86 (patch) | |
tree | 54994b57d8df3203b276d15ee73c46d227ea6826 /src/Subtitles/libssf/Split.cpp | |
parent | e736ccc10964dfcd571d1b0f07327819c31a63a9 (diff) |
apply astyle
git-svn-id: https://mpc-hc.svn.sourceforge.net/svnroot/mpc-hc/trunk@4039 10f7b99b-c216-0410-bff0-8a66a9350fd8
Diffstat (limited to 'src/Subtitles/libssf/Split.cpp')
-rw-r--r-- | src/Subtitles/libssf/Split.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/Subtitles/libssf/Split.cpp b/src/Subtitles/libssf/Split.cpp index 6c620703c..aef0bdb59 100644 --- a/src/Subtitles/libssf/Split.cpp +++ b/src/Subtitles/libssf/Split.cpp @@ -39,22 +39,22 @@ namespace ssf {
RemoveAll();
- if(size_t seplen = wcslen(sep)) {
- for(int i = 0, j = 0, len = str.GetLength();
+ if (size_t seplen = wcslen(sep)) {
+ for (int i = 0, j = 0, len = str.GetLength();
i <= len && (limit == 0 || GetCount() < limit);
i = j + (int)seplen) {
j = str.Find(sep, i);
- if(j < 0) {
+ if (j < 0) {
j = len;
}
CStringW s = i < j ? str.Mid(i, j - i) : L"";
- switch(type) {
+ switch (type) {
case Min:
s.Trim(); // fall through
case Def:
- if(s.IsEmpty()) {
+ if (s.IsEmpty()) {
break; // else fall through
}
case Max:
@@ -67,7 +67,7 @@ namespace ssf int Split::GetAtInt(size_t i)
{
- if(i >= GetCount()) {
+ if (i >= GetCount()) {
throw Exception(_T("Index out of bounds"));
}
return _wtoi(GetAt(i));
@@ -75,7 +75,7 @@ namespace ssf float Split::GetAtFloat(size_t i)
{
- if(i >= GetCount()) {
+ if (i >= GetCount()) {
throw Exception(_T("Index out of bounds"));
}
return (float)_wtof(GetAt(i));
|