Fix compilation errors with mingw-w64 5.0.0

pull/3/head
Hleb Valoshka 2019-08-13 09:00:25 +03:00
parent cfdda11bf6
commit 4af3d88925
5 changed files with 9 additions and 9 deletions

View File

@ -238,7 +238,7 @@ void BuildFavoritesMenu(HMENU menuBar,
return;
// Insert separator
menuInfo.cbSize = sizeof MENUITEMINFO;
menuInfo.cbSize = sizeof(MENUITEMINFO);
menuInfo.fMask = MIIM_TYPE | MIIM_STATE;
menuInfo.fType = MFT_SEPARATOR;
menuInfo.fState = MFS_UNHILITE;
@ -264,7 +264,7 @@ void BuildFavoritesMenu(HMENU menuBar,
if (subMenu = CreatePopupMenu())
{
// Create a menu item that displays a popup sub menu
menuInfo.cbSize = sizeof MENUITEMINFO;
menuInfo.cbSize = sizeof(MENUITEMINFO);
menuInfo.fMask = MIIM_SUBMENU | MIIM_TYPE | MIIM_ID;
menuInfo.fType = MFT_STRING;
menuInfo.wID = ID_BOOKMARKS_FIRSTBOOKMARK + rootResIndex;
@ -297,7 +297,7 @@ void BuildFavoritesMenu(HMENU menuBar,
{
clog << " " << child->name << '\n';
// Add item to sub menu
menuInfo.cbSize = sizeof MENUITEMINFO;
menuInfo.cbSize = sizeof(MENUITEMINFO);
menuInfo.fMask = MIIM_TYPE | MIIM_ID;
menuInfo.fType = MFT_STRING;
menuInfo.wID = ID_BOOKMARKS_FIRSTBOOKMARK + childResIndex;
@ -315,7 +315,7 @@ void BuildFavoritesMenu(HMENU menuBar,
// were added to sub menu
if (subMenuIndex == 0)
{
menuInfo.cbSize = sizeof MENUITEMINFO;
menuInfo.cbSize = sizeof(MENUITEMINFO);
menuInfo.fMask = MIIM_TYPE | MIIM_STATE;
menuInfo.fType = MFT_STRING;
menuInfo.fState = MFS_DISABLED;

View File

@ -157,7 +157,7 @@ void EclipseFinderDisplayItem(LPNMLVDISPINFOA nm)
}
void InitDateControls(HWND hDlg, astro::Date& newTime, SYSTEMTIME& fromTime, SYSTEMTIME& toTime)
void InitDateControls(HWND hDlg, const astro::Date& newTime, SYSTEMTIME& fromTime, SYSTEMTIME& toTime)
{
HWND dateItem = NULL;

View File

@ -186,10 +186,9 @@ FindStars(const StarDatabase& stardb, Pred pred, int nStars)
// Move the best matching stars into the vector
finalStars->reserve(nStars);
for (StarSet::const_iterator iter = firstStars.begin();
iter != firstStars.end(); iter++)
for (const auto& star : firstStars)
{
finalStars->insert(finalStars->end(), *iter);
finalStars->insert(finalStars->end(), star);
}
return finalStars;

View File

@ -12,7 +12,7 @@
#include <windows.h>
#include <commctrl.h>
#include "winviewoptsdlg.h"
#include "celengine\render.h"
#include "celengine/render.h"
#include "res/resource.h"

View File

@ -11,6 +11,7 @@
#define _CELMATH_MATHLIB_H_
#include <cmath>
#include <cstdlib>
#define PI 3.14159265358979323846