1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-16 19:19:56 +00:00

Fix some Clang 7 warnings

This commit is contained in:
Andrei Kortunov 2018-11-08 21:10:23 +04:00
parent e5b8491b58
commit d2613e35a2
6 changed files with 9 additions and 12 deletions

View file

@ -743,6 +743,7 @@ namespace
mVertices (vertices),
mRenderXform (renderXform)
{
assert(font != nullptr);
mVertexColourType = MyGUI::RenderManager::getInstance().getVertexFormat();
}

View file

@ -25,6 +25,8 @@ bool shouldAcceptKeyFocus(MyGUI::Widget* w)
/// Recursively get all child widgets that accept keyboard input
void getKeyFocusWidgets(MyGUI::Widget* parent, std::vector<MyGUI::Widget*>& results)
{
assert(parent != nullptr);
if (!parent->getVisible() || !parent->getEnabled())
return;

View file

@ -90,7 +90,7 @@ bool FFmpeg_Decoder::getNextPacket()
bool FFmpeg_Decoder::getAVAudioData()
{
bool got_frame;
bool got_frame = false;
if(mCodecCtx->codec_type != AVMEDIA_TYPE_AUDIO)
return false;

View file

@ -267,8 +267,6 @@ namespace
struct NifFileMock : Nif::File
{
MOCK_CONST_METHOD1(fail, void (const std::string&));
MOCK_CONST_METHOD1(warn, void (const std::string&));
MOCK_CONST_METHOD1(getRecord, Nif::Record* (std::size_t));
MOCK_CONST_METHOD0(numRecords, std::size_t ());
MOCK_CONST_METHOD1(getRoot, Nif::Record* (std::size_t));

View file

@ -134,9 +134,9 @@ public:
{
state->bindVertexBufferObject(bufferobject);
glVertexPointer(3, GL_FLOAT, sizeof(MyGUI::Vertex), static_cast<char*>(0));
glColorPointer(4, GL_UNSIGNED_BYTE, sizeof(MyGUI::Vertex), static_cast<char*>(0) + 12);
glTexCoordPointer(2, GL_FLOAT, sizeof(MyGUI::Vertex), static_cast<char*>(0) + 16);
glVertexPointer(3, GL_FLOAT, sizeof(MyGUI::Vertex), reinterpret_cast<char*>(0));
glColorPointer(4, GL_UNSIGNED_BYTE, sizeof(MyGUI::Vertex), reinterpret_cast<char*>(12));
glTexCoordPointer(2, GL_FLOAT, sizeof(MyGUI::Vertex), reinterpret_cast<char*>(16));
}
else
{

View file

@ -18,10 +18,6 @@ struct File
{
virtual ~File() = default;
virtual void fail(const std::string &msg) const = 0;
virtual void warn(const std::string &msg) const = 0;
virtual Record *getRecord(size_t index) const = 0;
virtual size_t numRecords() const = 0;
@ -71,14 +67,14 @@ class NIFFile final : public File
public:
/// Used if file parsing fails
void fail(const std::string &msg) const override
void fail(const std::string &msg) const
{
std::string err = " NIFFile Error: " + msg;
err += "\nFile: " + filename;
throw std::runtime_error(err);
}
/// Used when something goes wrong, but not catastrophically so
void warn(const std::string &msg) const override
void warn(const std::string &msg) const
{
Log(Debug::Warning) << " NIFFile Warning: " << msg << "\nFile: " << filename;
}