DynamicVariables are now supported with plugins on settings that are common to all measures (e.g. MaxValue).

This commit is contained in:
Birunthan Mohanathas 2011-09-26 14:05:07 +00:00
parent 8ca0d0a830
commit 477610f832

View File

@ -97,9 +97,11 @@ void CMeasurePlugin::ReadConfig(CConfigParser& parser, const WCHAR* section)
CMeasure::ReadConfig(parser, section); CMeasure::ReadConfig(parser, section);
// DynamicVariables is now disabled in MeasurePlugin due to a limitation of the re-initialization. if (m_Initialized)
// Do not set m_DynamicVariables to "true". {
m_DynamicVariables = false; // DynamicVariables doesn't work with plugins, so stop here.
return;
}
m_PluginName = parser.ReadString(section, L"Plugin", L""); m_PluginName = parser.ReadString(section, L"Plugin", L"");
@ -183,8 +185,8 @@ void CMeasurePlugin::ReadConfig(CConfigParser& parser, const WCHAR* section)
SetDllDirectory(L""); SetDllDirectory(L"");
CSystem::ResetWorkingDirectory(); CSystem::ResetWorkingDirectory();
std::wstring szMaxValue = parser.ReadString(section, L"MaxValue", L"NotSet"); const std::wstring& szMaxValue = parser.ReadString(section, L"MaxValue", L"");
if (szMaxValue == L"NotSet") if (szMaxValue.empty())
{ {
m_MaxValue = maxValue; m_MaxValue = maxValue;
} }