updated to the new pikotools api: changed the way how child_spaces are created in Space class
This commit is contained in:
@@ -144,14 +144,14 @@ void SessionData::BuildFileList(std::vector<long> & file_tab, pt::Space & space)
|
||||
{
|
||||
file_tab.clear();
|
||||
|
||||
if( space.child_spaces )
|
||||
{
|
||||
for(size_t i=0 ; i<space.child_spaces->size() ; ++i)
|
||||
{
|
||||
pt::Space & sp = *(*space.child_spaces)[i];
|
||||
pt::Space::TableType * child_table = space.find_child_space_table();
|
||||
|
||||
if( sp.name && (*sp.name) == L"param" )
|
||||
CheckFile(file_tab, sp);
|
||||
if( child_table )
|
||||
{
|
||||
for(pt::Space * sp : *child_table)
|
||||
{
|
||||
if( sp->is_child_space_name(L"param") )
|
||||
CheckFile(file_tab, *sp);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -159,21 +159,15 @@ void SessionData::BuildFileList(std::vector<long> & file_tab, pt::Space & space)
|
||||
|
||||
void SessionData::CheckFile(std::vector<long> & file_tab, pt::Space & space)
|
||||
{
|
||||
if( space.child_spaces )
|
||||
pt::Space::TableType * child_table = space.find_child_space_table();
|
||||
|
||||
if( child_table )
|
||||
{
|
||||
for(size_t i=0 ; i<space.child_spaces->size() ; ++i)
|
||||
for(pt::Space * sp : *child_table)
|
||||
{
|
||||
pt::Space & subsp = *(*space.child_spaces)[i];
|
||||
|
||||
if( subsp.name && *subsp.name == L"file" )
|
||||
if( sp->is_child_space_name(L"file") )
|
||||
{
|
||||
std::wstring * file_id_str = subsp.get_wstr(L"itemid");
|
||||
|
||||
if( file_id_str )
|
||||
{
|
||||
long file_id = Tol(*file_id_str);
|
||||
file_tab.push_back(file_id);
|
||||
}
|
||||
file_tab.push_back(sp->to_long(L"itemid"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user