allow to not set the res value from a plugin function
Add PluginInfo::has_res (bool, default true). If set to false by a plugin function then the PluginInfo::res value is not taken into account when calculating how many plugins have returned true or false.
This commit is contained in:
@@ -4,8 +4,8 @@
|
||||
* Author: Tomasz Sowa <t.sowa@ttmath.org>
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (c) 2008-2022, Tomasz Sowa
|
||||
/*
|
||||
* Copyright (c) 2008-2023, Tomasz Sowa
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -370,10 +370,13 @@ PluginRes Plugin::Call(morm::ModelConnector * model_connector, Log * plog, Cur *
|
||||
|
||||
Call(model_connector, plog, cur, message, i, info);
|
||||
|
||||
if( info.res )
|
||||
++res.res_true;
|
||||
else
|
||||
++res.res_false;
|
||||
if( info.has_res )
|
||||
{
|
||||
if( info.res )
|
||||
++res.res_true;
|
||||
else
|
||||
++res.res_false;
|
||||
}
|
||||
}
|
||||
|
||||
current_plugin = old_current_plugin;
|
||||
|
Reference in New Issue
Block a user