Simplify how functions are stored and passed. This is the first step in allowing us to sort functions so that dispatches are attempted in an organized order (as opposed to just the order they were added in).
Should have resulted in a speed imrovement too - fewer string copies during dispatch.
This commit is contained in:
@@ -583,9 +583,9 @@ namespace chaiscript
|
||||
while (begin != end)
|
||||
{
|
||||
try {
|
||||
if (begin->second->filter(plist))
|
||||
if ((*begin)->filter(plist))
|
||||
{
|
||||
return (*begin->second)(plist);
|
||||
return (*(*begin))(plist);
|
||||
}
|
||||
} catch (const bad_boxed_cast &) {
|
||||
//parameter failed to cast, try again
|
||||
|
Reference in New Issue
Block a user