MCPcopy Create free account
hub / github.com/StrongPC123/Far-Cry-1-Source-Full / LoadFiles

Method LoadFiles

Editor/PanelTreeBrowser.cpp:601–636  ·  view source on GitHub ↗

/////////////////////////////////////////////////////////////////////

Source from the content-addressed store, hash-verified

599
600//////////////////////////////////////////////////////////////////////////
601void CPanelTreeBrowser::LoadFiles( FilesInfo &info )
602{
603 CString fileSpec = m_fileSpec;
604 CString currFileSpec;
605 static CFileUtil::FileArray files;
606
607 info.files.clear();
608
609 // Reserve many files.
610 files.resize(0);
611 files.reserve( 10000 );
612
613 // Split file spec with ';'
614 while (!fileSpec.IsEmpty())
615 {
616 int splitpos = fileSpec.Find(';');
617 if (splitpos < 0)
618 {
619 currFileSpec = fileSpec;
620 CFileUtil::ScanDirectory( m_path,currFileSpec,files,true );
621 break;
622 }
623 CString currFileSpec = fileSpec.Mid(0,splitpos);
624 CFileUtil::ScanDirectory( m_path,currFileSpec,files,true );
625 fileSpec = fileSpec.Mid(splitpos+1);
626 }
627
628 info.files.reserve( files.size() );
629 for (int i = 0; i < files.size(); i++)
630 {
631 info.files.push_back( files[i].filename );
632 }
633 //std::sort( info.files.begin(),info.files.end() );
634
635 m_fileHistory[m_fileSpec] = info;
636}
637
638//////////////////////////////////////////////////////////////////////////
639void CPanelTreeBrowser::FillFiles( FilesInfo &finfo )

Callers

nothing calls this directly

Calls 8

MidMethod · 0.80
clearMethod · 0.45
resizeMethod · 0.45
reserveMethod · 0.45
IsEmptyMethod · 0.45
FindMethod · 0.45
sizeMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected