Subversion Repositories spk

Rev

Rev 214 | Rev 216 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 214 Rev 215
Line 6644... Line 6644...
6644
						continue;
6644
						continue;
6645
					if ( entries <= 0 )
6645
					if ( entries <= 0 )
6646
					{
6646
					{
6647
						entries = line.token(";", 2).toInt();
6647
						entries = line.token(";", 2).toInt();
6648
						currentSection = new SBodies;
6648
						currentSection = new SBodies;
6649
						currentSection->sSection = line.token(";", 1);
6649
						currentSection->sSection = line.token(";", 1).toWString();
6650
						bodiesList.push_back(currentSection);
6650
						bodiesList.push_back(currentSection);
6651
					}
6651
					}
6652
					else if ( currentSection )
6652
					else if ( currentSection )
6653
					{
6653
					{
6654
						int num;
6654
						int num;
Line 6657... Line 6657...
6657
						{
6657
						{
6658
							for ( int i = 0; i < num; i++ )
6658
							for ( int i = 0; i < num; i++ )
6659
							{
6659
							{
6660
								if ( strs[i].empty() )
6660
								if ( strs[i].empty() )
6661
									continue;
6661
									continue;
6662
								if(!currentSection->lEntries.contains(strs[i] + ";"))
6662
								if(!currentSection->lEntries.contains(strs[i].toWString() + L";"))
6663
									currentSection->lEntries.pushBack(strs[i] + ";");
6663
									currentSection->lEntries.pushBack(strs[i].toWString() + L";");
6664
								--entries;
6664
								--entries;
6665
							}
6665
							}
6666
						}
6666
						}
6667
						CLEANSPLIT(strs, num);
6667
						CLEANSPLIT(strs, num);
6668
					}
6668
					}
Line 6705... Line 6705...
6705
			}
6705
			}
6706
 
6706
 
6707
			if ( !foundSection )
6707
			if ( !foundSection )
6708
			{
6708
			{
6709
				foundSection = new SBodies;
6709
				foundSection = new SBodies;
6710
				foundSection->sSection = section;
6710
				foundSection->sSection = section.toWString();
6711
				bodiesList.push_back(foundSection);
6711
				bodiesList.push_back(foundSection);
6712
			}
6712
			}
6713
			if(!foundSection->lEntries.contains(body))
6713
			if(!foundSection->lEntries.contains(body))
6714
				foundSection->lEntries.pushBack(body);
6714
				foundSection->lEntries.pushBack(body);
6715
		}
6715
		}
Line 6724... Line 6724...
6724
 
6724
 
6725
	// now our sections
6725
	// now our sections
6726
	for ( SBodies *bSection = bodiesList.First(); bSection; bSection = bodiesList.Next() )
6726
	for ( SBodies *bSection = bodiesList.First(); bSection; bSection = bodiesList.Next() )
6727
	{
6727
	{
6728
		writeList.push_back("");
6728
		writeList.push_back("");
6729
		writeList.push_back("// Section: " + bSection->sSection);
6729
		writeList.push_back("// Section: " + bSection->sSection.toString());
6730
		writeList.push_back(bSection->sSection + ";" + Utils::String::Number(bSection->lEntries.size()) + ";");
6730
		writeList.push_back(bSection->sSection.toString() + ";" + Utils::String::Number(bSection->lEntries.size()) + ";");
6731
		for(auto itr = bSection->lEntries.begin(); itr != bSection->lEntries.end(); itr++)
6731
		for(auto itr = bSection->lEntries.begin(); itr != bSection->lEntries.end(); itr++)
6732
		{
6732
		{
6733
			Utils::String str = (*itr)->str;
6733
			Utils::WString str = (*itr)->str;
6734
			str.removeChar(9);
6734
			str.removeChar(9);
6735
			str.removeChar(' ');
6735
			str.removeChar(' ');
6736
			if ( str.right(1) != ";" )
6736
			if ( str.right(1) != L";" )
6737
				str += ";";
6737
				str += L";";
6738
			writeList.push_back(str);
6738
			writeList.push_back(str.toString());
6739
		}
6739
		}
6740
	}
6740
	}
6741
 
6741
 
6742
	// write the file to disk
6742
	// write the file to disk
6743
	CFileIO WriteFile(m_sTempDir + L"/Bodies.txt");
6743
	CFileIO WriteFile(m_sTempDir + L"/Bodies.txt");