mirror of
				https://github.com/chibicitiberiu/rainmeter-studio.git
				synced 2024-02-24 04:33:31 +00:00 
			
		
		
		
	- Additional fix for r502. Functions/Measures/Counter in Formula are now case-insensitive in MeasureCalc.
- "[Measure]" is now case-insensitive in DynamicVariables.
This commit is contained in:
		| @@ -504,12 +504,12 @@ bool CConfigParser::ReplaceMeasures(std::wstring& result) | ||||
| 					if (pos2 == std::wstring::npos || end < pos2) | ||||
| 					{ | ||||
| 						std::wstring var(result.begin() + pos + 1, result.begin() + end); | ||||
| 	 | ||||
| 						std::map<std::wstring, CMeasure*>::const_iterator iter = m_Measures.find(var); | ||||
| 						if (iter != m_Measures.end()) | ||||
|  | ||||
| 						CMeasure* measure = GetMeasure(var); | ||||
| 						if (measure) | ||||
| 						{ | ||||
| 							std::wstring value = (*iter).second->GetStringValue(false, 1, 5, false); | ||||
| 	 | ||||
| 							std::wstring value = measure->GetStringValue(false, 1, 5, false); | ||||
|  | ||||
| 							// Measure found, replace it with the value | ||||
| 							result.replace(result.begin() + pos, result.begin() + end + 1, value); | ||||
| 							start = pos + value.length(); | ||||
| @@ -612,6 +612,20 @@ void CConfigParser::AddMeasure(CMeasure* pMeasure) | ||||
| 	} | ||||
| } | ||||
|  | ||||
| CMeasure* CConfigParser::GetMeasure(const std::wstring& name) | ||||
| { | ||||
| 	std::map<std::wstring, CMeasure*>::const_iterator iter = m_Measures.begin(); | ||||
| 	for ( ; iter != m_Measures.end(); ++iter) | ||||
| 	{ | ||||
| 		if (wcsicmp((*iter).first.c_str(), name.c_str()) == 0) | ||||
| 		{ | ||||
| 			return (*iter).second; | ||||
| 		} | ||||
| 	} | ||||
|  | ||||
| 	return NULL; | ||||
| } | ||||
|  | ||||
| double CConfigParser::ReadFloat(LPCTSTR section, LPCTSTR key, double defValue) | ||||
| { | ||||
| 	TCHAR buffer[256]; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 spx
					spx