Skip to content

Commit 1e96c84

Browse files
committed
Merge pull request xbmc#1324 from Karlson2k/VS2012_compat
[win32] Make source code compatible with VS2012
2 parents 7a59fd7 + f1df3a0 commit 1e96c84

File tree

6 files changed

+15
-4
lines changed

6 files changed

+15
-4
lines changed

lib/UnrarXLib/os.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
#include <dir.h>
5656
#endif
5757
#ifdef _MSC_VER
58-
#define for if (0) ; else for
58+
// #define for if (0) ; else for
5959
#ifndef _WIN_CE
6060
#include <direct.h>
6161
#endif

lib/libRTV/GuideParser.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -855,6 +855,7 @@ int CalculateMinutes( int seconds )
855855
//-------------------------------------------------------------------------
856856

857857
//-------------------------------------------------------------------------
858+
#if _MSC_VER < 1700
858859
DWORD64 ntohll(DWORD64 llValue)
859860
{
860861
DWORD64 retval = 0;
@@ -884,7 +885,7 @@ DWORD64 ntohll(DWORD64 llValue)
884885

885886
return retval;
886887
}
887-
888+
#endif // _MSC_VER < 1700
888889
//-------------------------------------------------------------------------
889890
void ConvertProgramInfoEndian(struct tagProgramInfo * strProgramInfo)
890891
{

xbmc/PartyModeManager.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -665,7 +665,7 @@ void CPartyModeManager::AddToHistory(int type, int songID)
665665
{
666666
while (m_history.size() >= m_songsInHistory && m_songsInHistory)
667667
m_history.erase(m_history.begin());
668-
m_history.push_back(make_pair<int,int>(type,songID));
668+
m_history.push_back(make_pair(type,songID));
669669
}
670670

671671
void CPartyModeManager::GetRandomSelection(vector< pair<int,int> >& in, unsigned int number, vector< pair<int,int> >& out)

xbmc/addons/AddonDatabase.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ bool CAddonDatabase::GetAddon(int id, AddonPtr& addon)
268268
m_pDS2->query(sql.c_str());
269269
while (!m_pDS2->eof())
270270
{
271-
props.dependencies.insert(make_pair(m_pDS2->fv(0).get_asString(), make_pair(m_pDS2->fv(1).get_asString(), m_pDS2->fv(2).get_asBool())));
271+
props.dependencies.insert(make_pair(m_pDS2->fv(0).get_asString(), make_pair(AddonVersion(m_pDS2->fv(1).get_asString()), m_pDS2->fv(2).get_asBool())));
272272
m_pDS2->next();
273273
}
274274

xbmc/cores/dvdplayer/DVDCodecs/Video/DXVA.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,11 @@ DEFINE_GUID(DXVADDI_Intel_ModeH264_C, 0x604F8E66,0x4951,0x4c54,0x88,0xFE,0xAB,0x
8282
DEFINE_GUID(DXVADDI_Intel_ModeH264_E, 0x604F8E68,0x4951,0x4c54,0x88,0xFE,0xAB,0xD2,0x5C,0x15,0xB3,0xD6);
8383
DEFINE_GUID(DXVADDI_Intel_ModeVC1_E , 0xBCC5DB6D,0xA2B6,0x4AF0,0xAC,0xE4,0xAD,0xB1,0xF7,0x87,0xBC,0x89);
8484

85+
#if _MSC_VER < 1700
8586
DEFINE_GUID(DXVA_ModeMPEG2and1_VLD, 0x86695f12,0x340e,0x4f04,0x9f,0xd3,0x92,0x53,0xdd,0x32,0x74,0x60);
8687
// When exposed by an accelerator, indicates compliance with the August 2010 spec update
8788
DEFINE_GUID(DXVA_ModeVC1_D2010, 0x1b81beA4,0xa0c7,0x11d3,0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5);
89+
#endif
8890

8991
typedef struct {
9092
const char *name;

xbmc/utils/XBMCTinyXML.h

+8
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,19 @@
2424
#endif
2525
#ifdef TARGET_WINDOWS
2626
#define TIXML_USE_STL
27+
#if _MSC_VER < 1700
2728
#ifdef _DEBUG
2829
#pragma comment(lib, "tinyxmlSTLd.lib")
2930
#else
3031
#pragma comment(lib, "tinyxmlSTL.lib")
3132
#endif
33+
#else // _MSC_VER < 1700
34+
#ifdef _DEBUG
35+
#pragma comment(lib, "tinyxmlSTL11d.lib")
36+
#else
37+
#pragma comment(lib, "tinyxmlSTL11.lib")
38+
#endif
39+
#endif // _MSC_VER < 1700
3240
#else
3341
//compile fix for TinyXml < 2.6.0
3442
#define DOCUMENT TINYXML_DOCUMENT

0 commit comments

Comments
 (0)