Skip to content

Commit 5db91d8

Browse files
committed
More colour-related typecasts made explicit.
1 parent f1b3613 commit 5db91d8

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

dialogs/ColourPickerDlg.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -334,9 +334,9 @@ CColor clr;
334334

335335
clr.SetColor (m_ctlSwatch.m_colour);
336336

337-
float fHue = clr.GetHue ();
338-
float fSaturation = clr.GetSaturation ();
339-
float fLuminance = clr.GetLuminance ();
337+
double fHue = clr.GetHue ();
338+
double fSaturation = clr.GetSaturation ();
339+
double fLuminance = clr.GetLuminance ();
340340

341341
CString strName;
342342

@@ -550,7 +550,7 @@ LRESULT CColourPickerDlg::OnKickIdle(WPARAM, LPARAM)
550550

551551
void CColourPickerDlg::OnRandom()
552552
{
553-
m_ctlSwatch.m_colour = genrand () * (double) 0x1000000;
553+
m_ctlSwatch.m_colour = (COLORREF) (genrand () * (double) 0x1000000);
554554

555555
m_ctlSwatch.RedrawWindow ();
556556
ShowName ();

0 commit comments

Comments
 (0)