Clean up math functions
- Remove checking for standard functions from the build system - Prefix all invocations with std:: - Replace suffixed functions with unprefixed versions - Include <cmath> in all files that use it and remove the global include e.g. floorf(x) -> std::floor(x)
This commit is contained in:
@@ -4,6 +4,8 @@
|
||||
#include "ThemeManager.h"
|
||||
#include "archutils/Win32/ErrorStrings.h"
|
||||
|
||||
#include <cmath>
|
||||
|
||||
// Create*Font copied from MFC's CFont
|
||||
|
||||
// pLogFont->nHeight is interpreted as PointSize * 10
|
||||
@@ -20,7 +22,7 @@ static HFONT CreatePointFontIndirect(const LOGFONT* lpLogFont)
|
||||
::DPtoLP(hDC, &pt, 1);
|
||||
POINT ptOrg = { 0, 0 };
|
||||
::DPtoLP(hDC, &ptOrg, 1);
|
||||
logFont.lfHeight = -abs(pt.y - ptOrg.y);
|
||||
logFont.lfHeight = -std::abs(pt.y - ptOrg.y);
|
||||
|
||||
ReleaseDC(nullptr, hDC);
|
||||
|
||||
@@ -84,7 +86,7 @@ void DialogUtil::LocalizeDialogAndContents( HWND hdlg )
|
||||
/*
|
||||
* (c) 2002-2004 Chris Danford
|
||||
* All rights reserved.
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the
|
||||
* "Software"), to deal in the Software without restriction, including
|
||||
@@ -94,7 +96,7 @@ void DialogUtil::LocalizeDialogAndContents( HWND hdlg )
|
||||
* copyright notice(s) and this permission notice appear in all copies of
|
||||
* the Software and that both the above copyright notice(s) and this
|
||||
* permission notice appear in supporting documentation.
|
||||
*
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
|
||||
|
||||
Reference in New Issue
Block a user