Fixes for VS2008 and 2010 build

This commit is contained in:
Paul Obermeier
2018-03-22 17:35:13 +00:00
committed by Robert Osfield
parent 3c1e29db9f
commit b1170621c8
3 changed files with 8 additions and 5 deletions

View File

@@ -141,7 +141,7 @@ class BoneNameBoneMap : public std::map<std::string, osgAnimation::Bone*> {
public:
BoneNameBoneMap(const BoneSet& bones) {
for(BoneSet::iterator bone = bones.begin(); bone != bones.end(); ++bone) {
for(BoneSet::const_iterator bone = bones.begin(); bone != bones.end(); ++bone) {
insert(StringBonePair((*bone)->getName(), *bone));
}
}
@@ -153,7 +153,7 @@ class RigGeometryIndexMap : public std::map<osgAnimation::RigGeometry*, unsigned
public:
RigGeometryIndexMap(const RigGeometrySet& rigGeometrySet) {
unsigned int index = 0;
for(RigGeometrySet::iterator rigGeometry = rigGeometrySet.begin(); rigGeometry != rigGeometrySet.end(); ++rigGeometry, ++index) {
for(RigGeometrySet::const_iterator rigGeometry = rigGeometrySet.begin(); rigGeometry != rigGeometrySet.end(); ++rigGeometry, ++index) {
insert(RigGeometryIntPair(*rigGeometry, index));
}
}

View File

@@ -254,7 +254,7 @@ JSONObject* createImage(osg::Image* image, bool inlineImages, int maxTextureDime
in.seekg(0, std::ifstream::beg);
std::vector<unsigned char> rawData;
rawData.resize(size);
in.read(reinterpret_cast<char*>(rawData.data()),size);
in.read(reinterpret_cast<char*>(&rawData[0]),size);
in.seekg(std::ios_base::beg);
std::stringstream out;

View File

@@ -32,7 +32,8 @@
#define MOUSEEVENTF_FROMTOUCH 0xFF515700
#if(WINVER < 0x0601)
// _MSC_VER 1500: VS 2008
#if(WINVER < 0x0601 || _MSC_VER <= 1500)
// Provide Declarations for Multitouch
#define WM_TOUCH 0x0240
@@ -84,7 +85,9 @@ typedef TOUCHINPUT const * PCTOUCHINPUT;
// provide declaration for WM_POINTER* events
// which handle both touch and pen events
// for Windows 8 and above
#if(WINVER < 0x0602)
// _MSC_VER 1600: VS 2010
#if(WINVER < 0x0602 || _MSC_VER <= 1600)
#define WM_POINTERUPDATE 0x0245
#define WM_POINTERDOWN 0x0246