forked from mia/Aegisub
More optimizations!
Originally committed to SVN as r2370.
This commit is contained in:
parent
70e138bbf1
commit
cbc6260786
4 changed files with 6 additions and 6 deletions
|
@ -126,6 +126,7 @@
|
|||
AdditionalIncludeDirectories="include/athenasub;src"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_LIB;_WINDOWS;ATHENA_EXPORTS"
|
||||
RuntimeLibrary="2"
|
||||
StructMemberAlignment="0"
|
||||
EnableEnhancedInstructionSet="0"
|
||||
UsePrecompiledHeader="2"
|
||||
PrecompiledHeaderThrough="prec.h"
|
||||
|
|
|
@ -179,7 +179,7 @@ Action ActionModifyBatch::GetAntiAction(const IModel& model) const
|
|||
// For each line...
|
||||
for (size_t i=0;i<len;i++) {
|
||||
// Get old entry
|
||||
Entry oldEntry = sect->GetEntry(selection->GetLine(i));
|
||||
Entry& oldEntry = sect->GetEntryRef(selection->GetLine(i));
|
||||
|
||||
// Try to get a delta
|
||||
DeltaCoder deltaCoder = oldEntry->GetDeltaCoder();
|
||||
|
@ -213,7 +213,7 @@ Action ActionModifyBatch::GetAntiAction(const IModel& model) const
|
|||
// For each line...
|
||||
for (size_t i=0;i<len;i++) {
|
||||
// Get old entry
|
||||
Entry oldEntry = sect->GetEntry(selection->GetLine(i));
|
||||
Entry& oldEntry = sect->GetEntryRef(selection->GetLine(i));
|
||||
|
||||
// Try to get a delta
|
||||
DeltaCoder deltaCoder = oldEntry->GetDeltaCoder();
|
||||
|
|
|
@ -147,12 +147,11 @@ std::vector<Entry> CActionList::ModifyLines(Selection selection,const String sec
|
|||
for (size_t i=0;i<len;i++) {
|
||||
size_t rLen = selection->GetLinesInRange(i);
|
||||
for (size_t j=0;j<rLen;j++) {
|
||||
entries[n++] = sect->GetEntry(selection->GetLineInRange(j,i))->Clone();
|
||||
entries[n++] = sect->GetEntryRef(selection->GetLineInRange(j,i))->Clone();
|
||||
}
|
||||
}
|
||||
|
||||
// Generate the action
|
||||
Action action = Action (new ActionModifyBatch(entries,std::vector<VoidPtr>(),selection,section,false));
|
||||
AddAction(action);
|
||||
AddAction(Action(new ActionModifyBatch(entries,std::vector<VoidPtr>(),selection,section,false)));
|
||||
return entries;
|
||||
}
|
||||
|
|
|
@ -94,7 +94,7 @@ int main()
|
|||
#ifdef WXDEBUG
|
||||
int n = 1;
|
||||
#else
|
||||
int n = 100;
|
||||
int n = 1000;
|
||||
#endif
|
||||
cout << "Executing action " << n << " times... ";
|
||||
timer.Start();
|
||||
|
|
Loading…
Reference in a new issue