mirror of
https://github.com/OpenMW/openmw.git
synced 2025-11-28 16:04:30 +00:00
First batch of GCC/Ubuntu 24.04 warnings
This commit is contained in:
parent
4847995861
commit
b6f699d513
3 changed files with 29 additions and 28 deletions
|
|
@ -92,12 +92,12 @@ static void generateCube(osg::Geometry& geom, float dim)
|
||||||
normals->push_back(normale);
|
normals->push_back(normale);
|
||||||
}
|
}
|
||||||
GLushort startVertex(iFace * 4);
|
GLushort startVertex(iFace * 4);
|
||||||
GLushort newFace1[] = { startVertex, startVertex + 1u, startVertex + 2u };
|
GLushort newFace1[] = { startVertex, static_cast<GLushort>(startVertex + 1u), static_cast<GLushort>(startVertex + 2u) };
|
||||||
for (int i = 0; i < 3; i++)
|
for (int i = 0; i < 3; i++)
|
||||||
{
|
{
|
||||||
indices->push_back(newFace1[i]);
|
indices->push_back(newFace1[i]);
|
||||||
}
|
}
|
||||||
GLushort newFace2[] = { startVertex + 2u, startVertex + 1u, startVertex + 3u };
|
GLushort newFace2[] = { static_cast<GLushort>(startVertex + 2u), static_cast<GLushort>(startVertex + 1u), static_cast<GLushort>(startVertex + 3u) };
|
||||||
for (int i = 0; i < 3; i++)
|
for (int i = 0; i < 3; i++)
|
||||||
{
|
{
|
||||||
indices->push_back(newFace2[i]);
|
indices->push_back(newFace2[i]);
|
||||||
|
|
|
||||||
|
|
@ -17,26 +17,26 @@ public:
|
||||||
static UnicodeChar sBadChar() { return UnicodeChar(0xFFFFFFFF); }
|
static UnicodeChar sBadChar() { return UnicodeChar(0xFFFFFFFF); }
|
||||||
|
|
||||||
Utf8Stream(Point begin, Point end)
|
Utf8Stream(Point begin, Point end)
|
||||||
: cur(begin)
|
: mCur(begin)
|
||||||
, nxt(begin)
|
, mNxt(begin)
|
||||||
, end(end)
|
, mEnd(end)
|
||||||
, val(Utf8Stream::sBadChar())
|
, mVal(Utf8Stream::sBadChar())
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
Utf8Stream(const char* str)
|
Utf8Stream(const char* str)
|
||||||
: cur(reinterpret_cast<const unsigned char*>(str))
|
: mCur(reinterpret_cast<const unsigned char*>(str))
|
||||||
, nxt(reinterpret_cast<const unsigned char*>(str))
|
, mNxt(reinterpret_cast<const unsigned char*>(str))
|
||||||
, end(reinterpret_cast<const unsigned char*>(str) + strlen(str))
|
, mEnd(reinterpret_cast<const unsigned char*>(str) + strlen(str))
|
||||||
, val(Utf8Stream::sBadChar())
|
, mVal(Utf8Stream::sBadChar())
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
Utf8Stream(std::pair<Point, Point> range)
|
Utf8Stream(std::pair<Point, Point> range)
|
||||||
: cur(range.first)
|
: mCur(range.first)
|
||||||
, nxt(range.first)
|
, mNxt(range.first)
|
||||||
, end(range.second)
|
, mEnd(range.second)
|
||||||
, val(Utf8Stream::sBadChar())
|
, mVal(Utf8Stream::sBadChar())
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -45,23 +45,23 @@ public:
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
bool eof() const { return cur == end; }
|
bool eof() const { return mCur == mEnd; }
|
||||||
|
|
||||||
Point current() const { return cur; }
|
Point current() const { return mCur; }
|
||||||
|
|
||||||
UnicodeChar peek()
|
UnicodeChar peek()
|
||||||
{
|
{
|
||||||
if (cur == nxt)
|
if (mCur == mNxt)
|
||||||
next();
|
next();
|
||||||
return val;
|
return mVal;
|
||||||
}
|
}
|
||||||
|
|
||||||
UnicodeChar consume()
|
UnicodeChar consume()
|
||||||
{
|
{
|
||||||
if (cur == nxt)
|
if (mCur == mNxt)
|
||||||
next();
|
next();
|
||||||
cur = nxt;
|
mCur = mNxt;
|
||||||
return val;
|
return mVal;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool isAscii(unsigned char value) { return (value & 0x80) == 0; }
|
static bool isAscii(unsigned char value) { return (value & 0x80) == 0; }
|
||||||
|
|
@ -189,12 +189,12 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void next() { std::tie(val, nxt) = decode(nxt, end); }
|
void next() { std::tie(mVal, mNxt) = decode(mNxt, mEnd); }
|
||||||
|
|
||||||
Point cur;
|
Point mCur;
|
||||||
Point nxt;
|
Point mNxt;
|
||||||
Point end;
|
Point mEnd;
|
||||||
UnicodeChar val;
|
UnicodeChar mVal;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -17,8 +17,9 @@ namespace SceneUtil
|
||||||
public:
|
public:
|
||||||
KeyframeController() {}
|
KeyframeController() {}
|
||||||
|
|
||||||
KeyframeController(const KeyframeController& copy)
|
KeyframeController(const KeyframeController& copy, const osg::CopyOp& copyop)
|
||||||
: SceneUtil::Controller(copy)
|
: osg::Object(copy, copyop)
|
||||||
|
, SceneUtil::Controller(copy)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue