remove some warnings with VS2013

in time::time(unsigned hour, unsigned minute, unsigned second) constructor, add return statement if args are valid
This commit is contained in:
beru
2015-05-04 02:18:25 +09:00
parent 1b01493e9f
commit 49cc9b1ff7
5 changed files with 74 additions and 33 deletions

View File

@@ -16,6 +16,7 @@
#include PLATFORM_SPEC_HPP
#include <shellapi.h>
#include <stdexcept>
#include <VersionHelpers.h>
namespace nana
{
@@ -184,11 +185,10 @@ namespace detail
NONCLIENTMETRICS metrics = {};
metrics.cbSize = sizeof metrics;
#if(WINVER >= 0x0600)
OSVERSIONINFO osvi = {};
osvi.dwOSVersionInfoSize = sizeof(osvi);
::GetVersionEx(&osvi);
if (osvi.dwMajorVersion < 6)
if(!IsWindowsVistaOrGreater())
{
metrics.cbSize -= sizeof(metrics.iPaddedBorderWidth);
}
#endif
::SystemParametersInfo(SPI_GETNONCLIENTMETRICS, sizeof metrics, &metrics, 0);
def_font_ptr_ = make_native_font(metrics.lfMessageFont.lfFaceName, font_size_to_height(9), 400, false, false, false);