Author: ashaposhnikov
Date: Sat Sep 9 17:50:31 2017
New Revision: 75809
URL:
http://svn.reactos.org/svn/reactos?rev=75809&view=rev
Log:
[RAPPS] Replaced double ternary operators with one `if` for readability
Modified:
branches/GSoC_2017/rapps/reactos/base/applications/rapps/include/crichedit.h
Modified: branches/GSoC_2017/rapps/reactos/base/applications/rapps/include/crichedit.h
URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2017/rapps/reactos/base/ap…
==============================================================================
---
branches/GSoC_2017/rapps/reactos/base/applications/rapps/include/crichedit.h [iso-8859-1]
(original)
+++
branches/GSoC_2017/rapps/reactos/base/applications/rapps/include/crichedit.h [iso-8859-1]
Sat Sep 9 17:50:31 2017
@@ -19,8 +19,15 @@
SendMessageW(EM_SETTEXTEX, (WPARAM) &SetText, (LPARAM) lpszText);
- SetRangeFormatting(Len, Len + InsertedTextLen,
- (dwEffects == CFM_LINK) ? (PathIsURLW(lpszText) ? dwEffects : 0) :
dwEffects);
+ if ((dwEffects == CFM_LINK) && !PathIsURLW(lpszText))
+ {
+ // if text is not an URL, no styling is used
+ SetRangeFormatting(Len, Len + InsertedTextLen, 0);
+ }
+ else
+ {
+ SetRangeFormatting(Len, Len + InsertedTextLen, dwEffects);
+ }
}
}