MCPcopy Create free account
hub / github.com/WinMerge/winmerge / WriteProfileString

Method WriteProfileString

Src/Merge.cpp:1737–1753  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1735}
1736
1737BOOL CMergeApp::WriteProfileString(const tchar_t* lpszSection, const tchar_t* lpszEntry, const tchar_t* lpszValue)
1738{
1739 COptionsMgr *pOptions = GetOptionsMgr();
1740 if (lpszEntry != nullptr)
1741 {
1742 String name = strutils::format(_T("%s/%s"), lpszSection, lpszEntry);
1743 if (!pOptions->Get(name).IsString())
1744 pOptions->InitOption(name, lpszValue ? lpszValue : _T(""));
1745 return pOptions->SaveOption(name, lpszValue ? lpszValue : _T("")) == COption::OPT_OK;
1746 }
1747 else
1748 {
1749 String name = strutils::format(_T("%s/"), lpszSection);
1750 pOptions->RemoveOption(name);
1751 }
1752 return TRUE;
1753}
1754
1755void CMergeApp::AddZombieThread(CWinThread* pThread)
1756{

Callers 7

addToMruMethod · 0.80
SaveStateMethod · 0.80
ClearStateMethod · 0.80
PersistMethod · 0.80
ResetMessageBoxesMethod · 0.80
SaveToRegistryMethod · 0.80
SaveSettingsMethod · 0.80

Calls 7

IsStringMethod · 0.80
GetOptionsMgrFunction · 0.70
formatFunction · 0.50
GetMethod · 0.45
InitOptionMethod · 0.45
SaveOptionMethod · 0.45
RemoveOptionMethod · 0.45

Tested by

no test coverage detected