Skip to content

Commit

Permalink
VS2015 compile fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jushar committed Aug 1, 2016
1 parent cde2b15 commit 4d176b6
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 13 deletions.
8 changes: 4 additions & 4 deletions Client/gui/CGUIGridList_Impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ void CGUIGridList_Impl::ForceUpdate ( void )
}


int CGUIGridList_Impl::AddRow(bool fast, std::vector < pair<SString, bool> > *m_items)
int CGUIGridList_Impl::AddRow(bool fast, std::vector < std::pair<SString, bool> > *m_items)
{
try
{
Expand All @@ -198,11 +198,11 @@ int CGUIGridList_Impl::AddRow(bool fast, std::vector < pair<SString, bool> > *m_
}
}

int CGUIGridList_Impl::SetRowItemsText(int iRow, std::vector < pair<SString, bool> > *m_items)
int CGUIGridList_Impl::SetRowItemsText(int iRow, std::vector < std::pair<SString, bool> > *m_items)
{
int iSortColumn = reinterpret_cast < CEGUI::MultiColumnList* > (m_pWindow)->getSortColumn() + 1; // MTA columns start at 1, CEGUI at 0

std::vector < pair<SString, bool> >::iterator it = m_items->begin();
std::vector < std::pair<SString, bool> >::iterator it = m_items->begin();
int col = 1;
for (it; it != m_items->end(); it++)
{
Expand All @@ -229,7 +229,7 @@ void CGUIGridList_Impl::RemoveRow ( int iRow )
}


int CGUIGridList_Impl::InsertRowAfter(int iRow, std::vector < pair<SString, bool> > *m_items)
int CGUIGridList_Impl::InsertRowAfter(int iRow, std::vector < std::pair<SString, bool> > *m_items)
{
try
{
Expand Down
6 changes: 3 additions & 3 deletions Client/gui/CGUIGridList_Impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@ class CGUIGridList_Impl : public CGUIGridList, public CGUIElement_Impl
const char* GetColumnTitle ( int hColumn );

void SetSelectionMode ( SelectionMode mode );
int SetRowItemsText ( int iRow, std::vector < pair<SString,bool> > *m_items );
int SetRowItemsText ( int iRow, std::vector < std::pair<SString,bool> > *m_items );

void ForceUpdate ( void );
int AddRow ( bool bFast = false, std::vector < pair<SString,bool> > *m_items = NULL );
int AddRow ( bool bFast = false, std::vector < std::pair<SString,bool> > *m_items = NULL );
void RemoveRow ( int iRow );
int InsertRowAfter ( int iRow, std::vector < pair<SString, bool> > *m_items = NULL );
int InsertRowAfter ( int iRow, std::vector < std::pair<SString, bool> > *m_items = NULL );
void Clear ( void );
CGUIListItem* GetItem ( int iRow, int hColumn );
const char* GetItemText ( int iRow, int hColumn );
Expand Down
2 changes: 2 additions & 0 deletions Client/launch/StdInc.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
#define MSVCR_DLL "msvcr90.dll"
#elif _MSC_VER == 1800 // MSVC++ 12.0 (Visual Studio 2013)
#define MSVCR_DLL "msvcr120.dll"
#elif _MSC_VER == 1900 // MSVC++ 14.0 (Visual Studio 2015)
#define MSVCR_DLL "msvcr140.dll"
#else
#error "Insert VCR info"
#endif
4 changes: 2 additions & 2 deletions Client/mods/deathmatch/logic/CStaticFunctionDefinitions.h
Original file line number Diff line number Diff line change
Expand Up @@ -455,8 +455,8 @@ class CStaticFunctionDefinitions
static inline void GUIGridListSetColumnTitle ( CClientGUIElement& GUIElement, unsigned int uiColumn, const char *szTitle ) { static_cast < CGUIGridList* > ( GUIElement.GetCGUIElement () ) -> SetColumnTitle ( uiColumn, szTitle ); };
//static const char* GUIGridListGetColumnTitle ( CClientGUIElement& GUIElement, int iColumn );
static void GUIGridListSetScrollBars ( CClientEntity& Element, bool bH, bool bV );
static inline int GUIGridListAddRow (CClientGUIElement& GUIElement, bool bFast, std::vector < pair<SString, bool> > *m_items = NULL) { return static_cast < CGUIGridList* > (GUIElement.GetCGUIElement())->AddRow(bFast,m_items); };
static inline int GUIGridListInsertRowAfter ( CClientGUIElement& GUIElement, int iRow, std::vector < pair<SString, bool> > *m_items = NULL ) { return static_cast < CGUIGridList* > ( GUIElement.GetCGUIElement () ) -> InsertRowAfter ( iRow, m_items ); };
static inline int GUIGridListAddRow (CClientGUIElement& GUIElement, bool bFast, std::vector < std::pair<SString, bool> > *m_items = NULL) { return static_cast < CGUIGridList* > (GUIElement.GetCGUIElement())->AddRow(bFast,m_items); };
static inline int GUIGridListInsertRowAfter ( CClientGUIElement& GUIElement, int iRow, std::vector < std::pair<SString, bool> > *m_items = NULL ) { return static_cast < CGUIGridList* > ( GUIElement.GetCGUIElement () ) -> InsertRowAfter ( iRow, m_items ); };
static inline void GUIGridListRemoveRow ( CClientGUIElement& GUIElement, int iRow ) { static_cast < CGUIGridList* > ( GUIElement.GetCGUIElement () ) -> RemoveRow ( iRow ); };
static inline void GUIGridListAutoSizeColumn ( CClientGUIElement& GUIElement, unsigned int uiColumn ) { static_cast < CGUIGridList* > ( GUIElement.GetCGUIElement () ) -> AutoSizeColumn ( uiColumn ); };
static void GUIGridListClear ( CClientEntity& Element );
Expand Down
4 changes: 2 additions & 2 deletions Client/mods/deathmatch/logic/luadefs/CLuaGUIDefs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2226,7 +2226,7 @@ int CLuaGUIDefs::GUIGridListAddRow ( lua_State* luaVM )
else
{
// Vector containing our string arguments. We add a bool to store whether it was originally a number.
std::vector < pair<SString,bool> > m_items;
std::vector < std::pair<SString,bool> > m_items;
std::vector < CLuaArgument* > ::const_iterator it = Arguments.IterBegin();
for (it; it != Arguments.IterEnd(); it++)
{
Expand Down Expand Up @@ -2292,7 +2292,7 @@ int CLuaGUIDefs::GUIGridListInsertRowAfter ( lua_State* luaVM )
else
{
// Vector containing our string arguments. We add a bool to store whether it was originally a number.
std::vector < pair<SString, bool> > m_items;
std::vector < std::pair<SString, bool> > m_items;
std::vector < CLuaArgument* > ::const_iterator it = Arguments.IterBegin();
for (it; it != Arguments.IterEnd(); it++)
{
Expand Down
4 changes: 2 additions & 2 deletions Client/sdk/gui/CGUIGridList.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ class CGUIGridList : public CGUIElement
virtual void SetSelectionMode ( SelectionMode mode ) = 0;

virtual void ForceUpdate ( void ) = 0;
virtual int AddRow ( bool bFast = false, std::vector < pair<SString,bool> > *m_items = NULL ) = 0;
virtual int AddRow ( bool bFast = false, std::vector < std::pair<SString,bool> > *m_items = NULL ) = 0;
virtual void RemoveRow ( int iRow ) = 0;
virtual int InsertRowAfter ( int iRow, std::vector < pair<SString,bool> > *m_items = NULL ) = 0;
virtual int InsertRowAfter ( int iRow, std::vector < std::pair<SString,bool> > *m_items = NULL ) = 0;
virtual void Clear ( void ) = 0;
virtual CGUIListItem* GetItem ( int iRow, int hColumn ) = 0;
virtual const char* GetItemText ( int iRow, int hColumn ) = 0;
Expand Down
6 changes: 6 additions & 0 deletions Shared/sdk/SharedUtil.Win32Utf8FileHooks.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,12 @@ BUT
#else
#define MSVCR_DLL "msvcr120.dll"
#endif
#elif _MSC_VER == 1900 // MSVC++ 14.0 (Visual Studio 2015)
#ifdef _DEBUG
#define MSVCR_DLL "msvcr140d.dll"
#else
#define MSVCR_DLL "msvcr140.dll"
#endif
#else
#error "Insert VCR info"
#endif
Expand Down

0 comments on commit 4d176b6

Please sign in to comment.