Skip to content

Commit 07792ac

Browse files
committed
Revert "Merge commit '3fff4c532c363ac933c9'"
This reverts commit fb920a3, reversing changes made to 5f711c8.
1 parent 5af96f8 commit 07792ac

File tree

9 files changed

+391
-425
lines changed

9 files changed

+391
-425
lines changed

ProcessPreviousLine.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -746,7 +746,7 @@ assemble the full text of the original line.
746746
if (!m_LineList.IsEmpty ())
747747
{
748748
m_pCurrentLine = m_LineList.GetTail ();
749-
if (((m_pCurrentLine->flags & COMMENT) == 0) ||
749+
if ((m_pCurrentLine->flags & COMMENT == 0) ||
750750
m_pCurrentLine->hard_return)
751751
m_pCurrentLine = NULL;
752752
}

dialogs/ColourPickerDlg.cpp

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -160,8 +160,8 @@ int iResult = 0;
160160

161161
case eColourHue:
162162
{
163-
double hue1 = clr1.GetHue ();
164-
double hue2 = clr2.GetHue ();
163+
float hue1 = clr1.GetHue ();
164+
float hue2 = clr2.GetHue ();
165165
if (hue1 < hue2)
166166
{
167167
iResult = -1;
@@ -177,16 +177,16 @@ int iResult = 0;
177177
// hue the same - fall through and compare saturation (then luminance)
178178
case eColourSaturation:
179179
{
180-
double saturation1 = clr1.GetSaturation ();
181-
double saturation2 = clr2.GetSaturation ();
180+
float saturation1 = clr1.GetSaturation ();
181+
float saturation2 = clr2.GetSaturation ();
182182
if (saturation1 < saturation2)
183183
iResult = -1;
184184
else if (saturation1 > saturation2)
185185
iResult = 1;
186186
else
187187
{ // saturation the same - compare luminance
188-
double luminance1 = clr1.GetLuminance ();
189-
double luminance2 = clr2.GetLuminance ();
188+
float luminance1 = clr1.GetLuminance ();
189+
float luminance2 = clr2.GetLuminance ();
190190
if (luminance1 < luminance2)
191191
iResult = -1;
192192
else if (luminance1 > luminance2)
@@ -197,16 +197,16 @@ int iResult = 0;
197197

198198
case eColourLuminance:
199199
{
200-
double luminance1 = clr1.GetLuminance ();
201-
double luminance2 = clr2.GetLuminance ();
200+
float luminance1 = clr1.GetLuminance ();
201+
float luminance2 = clr2.GetLuminance ();
202202
if (luminance1 < luminance2)
203203
iResult = -1;
204204
else if (luminance1 > luminance2)
205205
iResult = 1;
206206
else
207207
{ // luminance the same - compare saturation
208-
double saturation1 = clr1.GetSaturation ();
209-
double saturation2 = clr2.GetSaturation ();
208+
float saturation1 = clr1.GetSaturation ();
209+
float saturation2 = clr2.GetSaturation ();
210210
if (saturation1 < saturation2)
211211
iResult = -1;
212212
else if (saturation1 > saturation2)
@@ -334,9 +334,9 @@ CColor clr;
334334

335335
clr.SetColor (m_ctlSwatch.m_colour);
336336

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

341341
CString strName;
342342

@@ -549,7 +549,7 @@ LRESULT CColourPickerDlg::OnKickIdle(WPARAM, LPARAM)
549549

550550
void CColourPickerDlg::OnRandom()
551551
{
552-
m_ctlSwatch.m_colour = (COLORREF) (genrand () * (double) 0x1000000);
552+
m_ctlSwatch.m_colour = genrand () * (double) 0x1000000;
553553

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

dialogs/DebugWorldInputDlg.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ CInsertUnicodeDlg dlg;
208208

209209
unsigned char utf8 [10];
210210

211-
int iLen = _pcre_ord2utf8 ((int) dlg.m_iCode, utf8);
211+
int iLen = _pcre_ord2utf8 (dlg.m_iCode, utf8);
212212

213213

214214
CString strText;

doc.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6043,7 +6043,7 @@ void CMUSHclientDoc::SendWindowSizes (const int iNewWidth)
60436043

60446044
pmyView->GetTextRect (&r);
60456045

6046-
WORD height = (WORD) ((r.bottom - r.top - m_iPixelOffset) / m_FontHeight);
6046+
WORD height = (r.bottom - r.top - m_iPixelOffset) / m_FontHeight;
60476047

60486048
// now tell them our size
60496049
unsigned char p [] = { IAC, SB, TELOPT_NAWS,

miniwindow.cpp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -618,7 +618,7 @@ long CMiniWindow::Font (LPCTSTR FontId, // eg. "inventory"
618618

619619
CFont * pFont = new CFont;
620620

621-
int lfHeight = -MulDiv(Size ? (int) Size : 10, dc.GetDeviceCaps(LOGPIXELSY), 72);
621+
int lfHeight = -MulDiv(Size ? Size : 10.0, dc.GetDeviceCaps(LOGPIXELSY), 72);
622622

623623
if (pFont->CreateFont (lfHeight,
624624
0, // int nWidth,
@@ -1293,7 +1293,7 @@ long CMiniWindow::WritePng (LPCTSTR FileName, const BITMAPINFO * bmi, unsigned c
12931293

12941294
long bpl = BytesPerLine (bmi->bmiHeader.biWidth, 24);
12951295

1296-
unsigned long row;
1296+
long row;
12971297
unsigned char * p = pData;
12981298

12991299
// have to reverse row order
@@ -1925,7 +1925,7 @@ long CMiniWindow::ImageOp(short Action,
19251925

19261926
} // end of CMiniWindow::ImageOp
19271927

1928-
long CMiniWindow::CreateImage(LPCTSTR ImageId, WORD Row1, WORD Row2, WORD Row3, WORD Row4, WORD Row5, WORD Row6, WORD Row7, WORD Row8)
1928+
long CMiniWindow::CreateImage(LPCTSTR ImageId, long Row1, long Row2, long Row3, long Row4, long Row5, long Row6, long Row7, long Row8)
19291929
{
19301930

19311931
ImageMapIterator it = m_Images.find (ImageId);
@@ -2679,12 +2679,12 @@ static void MakeTexture (const COLORREF Multiplier,
26792679
const long iHeight)
26802680
{
26812681

2682-
ULONG rval = GetRValue (Multiplier),
2682+
long rval = GetRValue (Multiplier),
26832683
gval = GetGValue (Multiplier),
26842684
bval = GetBValue (Multiplier);
26852685

2686-
ULONG row, col;
2687-
ULONG c;
2686+
long row, col;
2687+
long c;
26882688

26892689
int increment = BytesPerLine (iWidth, 24);
26902690

@@ -2695,9 +2695,9 @@ static void MakeTexture (const COLORREF Multiplier,
26952695
for (row = 0; row < iHeight; row++)
26962696
{
26972697
c = col ^ row;
2698-
p [0] = (unsigned char) (c * bval);
2699-
p [1] = (unsigned char) (c * gval);
2700-
p [2] = (unsigned char) (c * rval);
2698+
p [0] = c * bval;
2699+
p [1] = c * gval;
2700+
p [2] = c * rval;
27012701
p += increment;
27022702
} // end of each row
27032703
} // end of each column
@@ -2969,7 +2969,7 @@ static void Noise (unsigned char * inbuf, long iWidth, long iHeight, long iPerLi
29692969
for (i = 0; i < count; i++)
29702970
{
29712971
c = *pi;
2972-
c += (long) ((128 - genrand () * 256) * threshold);
2972+
c += (128 - genrand () * 256) * threshold;
29732973
*pi++ = CLAMP (c);
29742974
}
29752975

miniwindow.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ class CMiniWindow
228228
long EllipseWidth, long EllipseHeight);
229229

230230
long CreateImage(LPCTSTR ImageId,
231-
WORD Row1, WORD Row2, WORD Row3, WORD Row4, WORD Row5, WORD Row6, WORD Row7, WORD Row8);
231+
long Row1, long Row2, long Row3, long Row4, long Row5, long Row6, long Row7, long Row8);
232232

233233
long BlendImage(LPCTSTR ImageId,
234234
long Left, long Top, long Right, long Bottom,

0 commit comments

Comments
 (0)