fixed: find_ticket_value (in plugins/ticket/templates.cpp)
should find the first item (can be more than one item with the same 'param') fixed: added sorting tickets params in ReadTicketParams() (in plugins/ticket/ticketinfo.cpp) fixed: plugin should have its own 'PluginInfo info' struct a plugin's function can call another plugin's functions added: removing tickets files/images added: removing threads changed: rm function will call WINIX_FILE_REMOVED now when deleting directories git-svn-id: svn://ttmath.org/publicrep/winix/trunk@710 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
@@ -49,6 +49,7 @@ return percent;
|
||||
|
||||
|
||||
// binary search for conf_item.id in ticket.par_tab (ticket.par_tab must be sorted by 'param')
|
||||
// !! zmienic nazwe na find_ticket_param
|
||||
bool find_ticket_value(const TicketConf::TicketItem & conf_item, const Ticket & ticket, size_t & ticket_par_index)
|
||||
{
|
||||
if( ticket.par_tab.empty() )
|
||||
@@ -68,6 +69,9 @@ bool find_ticket_value(const TicketConf::TicketItem & conf_item, const Ticket &
|
||||
|
||||
if( ticket.par_tab[o2].param == conf_item.id )
|
||||
{
|
||||
while( o2 > 0 && ticket.par_tab[o2-1].param == conf_item.id )
|
||||
--o2;
|
||||
|
||||
ticket_par_index = o2;
|
||||
return true;
|
||||
}
|
||||
@@ -81,7 +85,12 @@ bool find_ticket_value(const TicketConf::TicketItem & conf_item, const Ticket &
|
||||
ticket_par_index = (o1 + o2) / 2;
|
||||
|
||||
if( ticket.par_tab[ticket_par_index].param == conf_item.id )
|
||||
{
|
||||
while( ticket_par_index > 0 && ticket.par_tab[ticket_par_index-1].param == conf_item.id )
|
||||
--ticket_par_index;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
if( ticket.par_tab[ticket_par_index].param < conf_item.id )
|
||||
o1 = ticket_par_index;
|
||||
|
||||
Reference in New Issue
Block a user