diff --git a/es-app/src/CollectionSystemsManager.cpp b/es-app/src/CollectionSystemsManager.cpp index c96f46865..9e9db245e 100644 --- a/es-app/src/CollectionSystemsManager.cpp +++ b/es-app/src/CollectionSystemsManager.cpp @@ -727,7 +727,7 @@ FileData* CollectionSystemsManager::updateCollectionFolderMetadata(SystemData* s std::string desc = "This collection is empty."; std::vector gamesList = rootFolder->getChildren(); std::vector gamesListRandom; - unsigned int gameCount = gamesList.size(); + unsigned int gameCount = static_cast(gamesList.size()); // If there is more than 1 game in the collection, then randomize the example game names. if (gameCount > 1) { diff --git a/es-app/src/FileFilterIndex.cpp b/es-app/src/FileFilterIndex.cpp index 6325fabb5..653f6a923 100644 --- a/es-app/src/FileFilterIndex.cpp +++ b/es-app/src/FileFilterIndex.cpp @@ -167,7 +167,7 @@ std::string FileFilterIndex::getIndexableKey(FileData* game, // been used for scraping the ratings, or if the gamelist.xml file // has been manually edited. ratingNumber = static_cast( - (ceilf(stof(ratingString) / 0.1) / 10) * 5); + (ceilf(stof(ratingString) / 0.1f) / 10) * 5); if (ratingNumber < 0) ratingNumber = 0; diff --git a/es-app/src/guis/GuiMetaDataEd.cpp b/es-app/src/guis/GuiMetaDataEd.cpp index d267ba920..cdb7a6855 100644 --- a/es-app/src/guis/GuiMetaDataEd.cpp +++ b/es-app/src/guis/GuiMetaDataEd.cpp @@ -107,9 +107,9 @@ GuiMetaDataEd::GuiMetaDataEd( case MD_BOOL: { ed = std::make_shared(window); // Make the switches slightly smaller. - auto switchSize = ed->getSize() * 0.9; + auto switchSize = ed->getSize() * 0.9f; ed->setResize(switchSize.x(), switchSize.y()); - ed->setOrigin(-0.05, -0.09); + ed->setOrigin(-0.05f, -0.09f); ed->setChangedColor(ICONCOLOR_USERMARKED); row.addElement(ed, false, true); diff --git a/es-app/src/scrapers/ScreenScraper.cpp b/es-app/src/scrapers/ScreenScraper.cpp index 706e8c2f0..af9fce99d 100644 --- a/es-app/src/scrapers/ScreenScraper.cpp +++ b/es-app/src/scrapers/ScreenScraper.cpp @@ -327,7 +327,7 @@ void ScreenScraperRequest::processGame(const pugi::xml_document& xmldoc, if (game.child("note")) { float ratingVal = (game.child("note").text().as_int() / 20.0f); // Round up to the closest .1 value, i.e. to the closest half-star. - ratingVal = ceilf(ratingVal / 0.1) / 10; + ratingVal = ceilf(ratingVal / 0.1f) / 10; std::stringstream ss; ss << ratingVal; if (ratingVal > 0) { diff --git a/es-app/src/views/ViewController.cpp b/es-app/src/views/ViewController.cpp index f7c492a8f..57fb9f694 100644 --- a/es-app/src/views/ViewController.cpp +++ b/es-app/src/views/ViewController.cpp @@ -713,14 +713,14 @@ void ViewController::render(const Transform4x4f& parentTrans) if (mFadeOpacity) { unsigned int fadeColor = 0x00000000 | static_cast(mFadeOpacity * 255); Renderer::setMatrix(parentTrans); - Renderer::drawRect(0.0f, 0.0f, Renderer::getScreenWidth(), - Renderer::getScreenHeight(), fadeColor, fadeColor); + Renderer::drawRect(0.0f, 0.0f, static_cast(Renderer::getScreenWidth()), + static_cast(Renderer::getScreenHeight()), fadeColor, fadeColor); } } void ViewController::preload() { - unsigned int systemCount = SystemData::sSystemVector.size(); + unsigned int systemCount = static_cast(SystemData::sSystemVector.size()); for (auto it = SystemData::sSystemVector.cbegin(); it != SystemData::sSystemVector.cend(); it ++) { diff --git a/es-app/src/views/gamelist/GridGameListView.cpp b/es-app/src/views/gamelist/GridGameListView.cpp index d06c1481f..ae6efdeb0 100644 --- a/es-app/src/views/gamelist/GridGameListView.cpp +++ b/es-app/src/views/gamelist/GridGameListView.cpp @@ -230,7 +230,6 @@ bool GridGameListView::input(InputConfig* config, Input input) const std::string GridGameListView::getImagePath(FileData* file) { ImageSource src = mGrid.getImageSource(); - FileData* returnFile; if (src == ImageSource::IMAGE) return file->getImagePath(); diff --git a/es-app/src/views/gamelist/ISimpleGameListView.cpp b/es-app/src/views/gamelist/ISimpleGameListView.cpp index 25fab1016..027ac5e8a 100644 --- a/es-app/src/views/gamelist/ISimpleGameListView.cpp +++ b/es-app/src/views/gamelist/ISimpleGameListView.cpp @@ -396,11 +396,13 @@ void ISimpleGameListView::generateGamelistInfo(FileData* cursor, FileData* first if (idx->isFiltered()) { mIsFiltered = true; - mFilteredGameCount = rootFolder->getFilesRecursive(GAME, true, false).size(); + mFilteredGameCount = static_cast(rootFolder-> + getFilesRecursive(GAME, true, false).size()); // Also count the games that are set to not be counted as games, as the filter may // apply to such entries as well and this will be indicated with a separate '+ XX' // in the GamelistInfo field. - mFilteredGameCountAll = rootFolder->getFilesRecursive(GAME, true, true).size(); + mFilteredGameCountAll = static_cast(rootFolder-> + getFilesRecursive(GAME, true, true).size()); } if (firstEntry->getParent() && firstEntry->getParent()->getType() == FOLDER) diff --git a/es-core/src/AudioManager.cpp b/es-core/src/AudioManager.cpp index f1d643024..0c0c9d301 100644 --- a/es-core/src/AudioManager.cpp +++ b/es-core/src/AudioManager.cpp @@ -151,8 +151,8 @@ void AudioManager::mixAudio(void* /*unused*/, Uint8* stream, int len) } // Mix sample into stream. SDL_MixAudioFormat(stream, &(sound->getData()[sound->getPosition()]), - sAudioFormat.format, restLength, - Settings::getInstance()->getInt("SoundVolumeNavigation") * 1.28f); + sAudioFormat.format, restLength, static_cast(Settings::getInstance()-> + getInt("SoundVolumeNavigation") * 1.28f)); if (sound->getPosition() + restLength < sound->getLength()) { // Sample hasn't ended yet. stillPlaying = true; @@ -204,7 +204,8 @@ void AudioManager::mixAudio(void* /*unused*/, Uint8* stream, int len) if (processedLength > 0) SDL_MixAudioFormat(stream, converted, sAudioFormat.format, processedLength, - Settings::getInstance()->getInt("SoundVolumeVideos") * 1.28); + static_cast(Settings::getInstance()-> + getInt("SoundVolumeVideos") * 1.28f)); } delete[] converted; diff --git a/es-core/src/components/ComponentGrid.cpp b/es-core/src/components/ComponentGrid.cpp index 56800874e..4e635b647 100644 --- a/es-core/src/components/ComponentGrid.cpp +++ b/es-core/src/components/ComponentGrid.cpp @@ -354,7 +354,7 @@ void ComponentGrid::render(const Transform4x4f& parentTrans) if (mLines.size()) { Renderer::setMatrix(trans); Renderer::bindTexture(0); - Renderer::drawLines(&mLines[0], mLines.size()); + Renderer::drawLines(&mLines[0], static_cast(mLines.size())); } } diff --git a/es-core/src/components/ComponentList.cpp b/es-core/src/components/ComponentList.cpp index 39bca4bc5..a1fa52ad5 100644 --- a/es-core/src/components/ComponentList.cpp +++ b/es-core/src/components/ComponentList.cpp @@ -101,7 +101,7 @@ bool ComponentList::input(InputConfig* config, Input input) } else if (config->isMappedLike("righttrigger", input)) { if (input.value != 0) { - mSelectorBarOffset = mEntries.size() - 1; + mSelectorBarOffset = mEntries.size() - 1.0f; return listLastRow(); } } @@ -254,7 +254,7 @@ void ComponentList::render(const Transform4x4f& parentTrans) // Custom rendering. Renderer::setMatrix(trans); - float opacity = mOpacity / 255.0; + float opacity = mOpacity / 255.0f; // Draw selector bar. if (mFocused) { diff --git a/es-core/src/components/GridTileComponent.cpp b/es-core/src/components/GridTileComponent.cpp index 3777234f1..2555d7e6d 100644 --- a/es-core/src/components/GridTileComponent.cpp +++ b/es-core/src/components/GridTileComponent.cpp @@ -213,7 +213,7 @@ void GridTileComponent::setSelected(bool selected, bool allowAnimation, auto func = [this](float t) { t -= 1; // Cubic ease out. float pct = Math::lerp(0, 1, t*t*t + 1); - this->setSelectedZoom(1.0 - pct); + this->setSelectedZoom(1.0f - pct); }; cancelAnimation(3); @@ -271,7 +271,7 @@ void GridTileComponent::calcCurrentProperties() { mCurrentProperties = mSelected ? mSelectedProperties : mDefaultProperties; - float zoomPercentInverse = 1.0 - mSelectedZoomPercent; + float zoomPercentInverse = 1.0f - mSelectedZoomPercent; if (mSelectedZoomPercent != 0.0f && mSelectedZoomPercent != 1.0f) { if (mDefaultProperties.mSize != mSelectedProperties.mSize) diff --git a/es-core/src/components/IList.h b/es-core/src/components/IList.h index 79a04d914..06087139a 100644 --- a/es-core/src/components/IList.h +++ b/es-core/src/components/IList.h @@ -235,7 +235,7 @@ protected: bool listLastRow() { - mCursor = mEntries.size() - 1; + mCursor = static_cast(mEntries.size()) - 1; onCursorChanged(CURSOR_STOPPED); onScroll(); return true; diff --git a/es-core/src/components/ImageComponent.cpp b/es-core/src/components/ImageComponent.cpp index 3a35c7742..32fabe15c 100644 --- a/es-core/src/components/ImageComponent.cpp +++ b/es-core/src/components/ImageComponent.cpp @@ -337,7 +337,7 @@ void ImageComponent::updateVertices() void ImageComponent::updateColors() { - const float opacity = (mOpacity * (mFading ? mFadeOpacity / 255.0 : 1.0)) / 255.0; + const float opacity = (mOpacity * (mFading ? mFadeOpacity / 255.0f : 1.0f)) / 255.0f; const unsigned int color = Renderer::convertRGBAToABGR((mColorShift & 0xFFFFFF00) | static_cast((mColorShift & 0xFF) * opacity)); const unsigned int colorEnd = Renderer::convertRGBAToABGR((mColorShiftEnd & 0xFFFFFF00) | diff --git a/es-core/src/components/ImageGridComponent.h b/es-core/src/components/ImageGridComponent.h index 21eabfe07..d75555501 100644 --- a/es-core/src/components/ImageGridComponent.h +++ b/es-core/src/components/ImageGridComponent.h @@ -399,7 +399,7 @@ void ImageGridComponent::onCursorChanged(const CursorState& state) int oldCol = (mLastCursor / dimOpposite); int col = (mCursor / dimOpposite); - int lastCol = ((mEntries.size() - 1) / dimOpposite); + int lastCol = static_cast((mEntries.size() - 1) / dimOpposite); int lastScroll = std::max(0, (lastCol + 1 - dimScrollable)); @@ -423,9 +423,9 @@ void ImageGridComponent::onCursorChanged(const CursorState& state) int newIdx = mCursor - mStartPosition + (dimOpposite * EXTRAITEMS); if (isScrollLoop()) { if (newIdx < 0) - newIdx += mEntries.size(); + newIdx += static_cast(mEntries.size()); else if (newIdx >= mTiles.size()) - newIdx -= mEntries.size(); + newIdx -= static_cast(mEntries.size()); } if (newIdx >= 0 && newIdx < mTiles.size()) @@ -626,9 +626,9 @@ void ImageGridComponent::updateTileAtPos(int tilePos, int imgPos, if (isScrollLoop()) { if (imgPos < 0) - imgPos += mEntries.size(); + imgPos += static_cast(mEntries.size()); else if (imgPos >= size()) - imgPos -= mEntries.size(); + imgPos -= static_cast(mEntries.size()); } // If we have more tiles than we have to display images on screen, hide them. @@ -686,7 +686,8 @@ void ImageGridComponent::calcGridDimension() mLastRowPartial = floorf(gridDimension.y()) != gridDimension.y(); // Ceil y dim so we can display partial last row. - mGridDimension = Vector2i(gridDimension.x(), ceilf(gridDimension.y())); + mGridDimension = Vector2i(static_cast(gridDimension.x()), + static_cast(ceilf(gridDimension.y()))); // Grid dimension validation. if (mGridDimension.x() < 1) { diff --git a/es-core/src/components/NinePatchComponent.cpp b/es-core/src/components/NinePatchComponent.cpp index a3e349a44..6e707fc03 100644 --- a/es-core/src/components/NinePatchComponent.cpp +++ b/es-core/src/components/NinePatchComponent.cpp @@ -116,7 +116,7 @@ void NinePatchComponent::render(const Transform4x4f& parentTrans) Renderer::setMatrix(trans); if (mOpacity < 255) { mVertices[0].shaders = Renderer::SHADER_OPACITY; - mVertices[0].opacity = mOpacity / 255.0; + mVertices[0].opacity = mOpacity / 255.0f; } else if (mVertices[0].shaders & Renderer::SHADER_OPACITY) { // We have reached full opacity, so disable the opacity shader and set @@ -136,17 +136,6 @@ void NinePatchComponent::onSizeChanged() buildVertices(); } -const Vector2f& NinePatchComponent::getCornerSize() const -{ - return mCornerSize; -} - -void NinePatchComponent::setCornerSize(int sizeX, int sizeY) -{ - mCornerSize = Vector2f(sizeX, sizeY); - buildVertices(); -} - void NinePatchComponent::fitTo(Vector2f size, Vector3f position, Vector2f padding) { size += padding; diff --git a/es-core/src/components/NinePatchComponent.h b/es-core/src/components/NinePatchComponent.h index f05fcfef8..c7ff33145 100644 --- a/es-core/src/components/NinePatchComponent.h +++ b/es-core/src/components/NinePatchComponent.h @@ -49,9 +49,12 @@ public: virtual void applyTheme(const std::shared_ptr& theme, const std::string& view, const std::string& element, unsigned int properties) override; - const Vector2f& getCornerSize() const; - void setCornerSize(int sizeX, int sizeY); - inline void setCornerSize(const Vector2f& size) { setCornerSize(size.x(), size.y()); } + inline const Vector2f& getCornerSize() const { return mCornerSize; }; + inline void setCornerSize(const Vector2f& size) + { + mCornerSize = size; + buildVertices(); + }; private: void buildVertices(); diff --git a/es-core/src/components/RatingComponent.cpp b/es-core/src/components/RatingComponent.cpp index 560f1910a..c86b8f02a 100644 --- a/es-core/src/components/RatingComponent.cpp +++ b/es-core/src/components/RatingComponent.cpp @@ -39,7 +39,7 @@ void RatingComponent::setValue(const std::string& value) } else { // Round up to the closest .1 value, i.e. to the closest half-icon. - mValue = ceilf(stof(value) / 0.1) / 10; + mValue = ceilf(stof(value) / 0.1f) / 10; mOriginalValue = static_cast(mValue * 10); // If the argument to colorize the rating icons has been passed, set the diff --git a/es-core/src/components/ScrollableContainer.cpp b/es-core/src/components/ScrollableContainer.cpp index 8955c7111..d2c2576b1 100644 --- a/es-core/src/components/ScrollableContainer.cpp +++ b/es-core/src/components/ScrollableContainer.cpp @@ -93,7 +93,7 @@ void ScrollableContainer::update(int deltaTime) const float widthMod = contentSize.x() / AUTO_WIDTH_MOD; if (mAutoScrollSpeed != 0) { - mAutoScrollAccumulator += deltaTime / widthMod; + mAutoScrollAccumulator += deltaTime / static_cast(widthMod); while (mAutoScrollAccumulator >= mAutoScrollSpeed) { mScrollPos += mScrollDir; diff --git a/es-core/src/components/TextListComponent.h b/es-core/src/components/TextListComponent.h index 773215cd6..5b915d9d4 100644 --- a/es-core/src/components/TextListComponent.h +++ b/es-core/src/components/TextListComponent.h @@ -236,7 +236,8 @@ void TextListComponent::render(const Transform4x4f& parentTrans) offset[0] = mHorizontalMargin; break; case ALIGN_CENTER: - offset[0] = static_cast((mSize.x() - entry.data.textCache->metrics.size.x()) / 2); + offset[0] = static_cast((mSize.x() - + entry.data.textCache->metrics.size.x()) / 2); if (offset[0] < mHorizontalMargin) offset[0] = mHorizontalMargin; break; diff --git a/es-core/src/components/VideoVlcComponent.cpp b/es-core/src/components/VideoVlcComponent.cpp index 934ab342f..d0f0b0e63 100644 --- a/es-core/src/components/VideoVlcComponent.cpp +++ b/es-core/src/components/VideoVlcComponent.cpp @@ -174,7 +174,7 @@ void VideoVlcComponent::render(const Transform4x4f& parentTrans) if (mIsPlaying && mContext.valid && mIsActuallyPlaying) { unsigned int color; if (mFadeIn < 1) { - const unsigned int fadeIn = mFadeIn * 255.0f; + const unsigned int fadeIn = static_cast(mFadeIn * 255.0f); color = Renderer::convertRGBAToABGR((fadeIn << 24) | (fadeIn << 16) | (fadeIn << 8) | 255); } @@ -300,7 +300,6 @@ void VideoVlcComponent::startVideo() if (mMedia) { unsigned track_count; int parseResult; - libvlc_event_t vlcEvent; // Asynchronous media parsing. libvlc_event_attach(libvlc_media_event_manager(mMedia), diff --git a/es-core/src/guis/GuiComplexTextEditPopup.cpp b/es-core/src/guis/GuiComplexTextEditPopup.cpp index 5c4696d56..bf5a0a08a 100644 --- a/es-core/src/guis/GuiComplexTextEditPopup.cpp +++ b/es-core/src/guis/GuiComplexTextEditPopup.cpp @@ -80,7 +80,7 @@ GuiComplexTextEditPopup::GuiComplexTextEditPopup( mGrid.setEntry(mText, Vector2i(0, 3), true, false, Vector2i(1, 1), GridFlags::BORDER_TOP | GridFlags::BORDER_BOTTOM); mGrid.setEntry(mButtonGrid, Vector2i(0, 4), true, false); - mGrid.setRowHeightPerc(1, 0.15, true); + mGrid.setRowHeightPerc(1, 0.15f, true); float textHeight = mText->getFont()->getHeight(); @@ -89,7 +89,7 @@ GuiComplexTextEditPopup::GuiComplexTextEditPopup( mText->setSize(0, textHeight); setSize(Renderer::getScreenWidth() * 0.75f, mTitle->getFont()->getHeight() + - textHeight + mButtonGrid->getSize().y() + mButtonGrid->getSize().y() * 1.85); + textHeight + mButtonGrid->getSize().y() + mButtonGrid->getSize().y() * 1.85f); setPosition((Renderer::getScreenWidth() - mSize.x()) / 2, (Renderer::getScreenHeight() - mSize.y()) / 2); mText->startEditing(); diff --git a/es-core/src/renderers/Renderer.cpp b/es-core/src/renderers/Renderer.cpp index 34625eb89..76d280fce 100644 --- a/es-core/src/renderers/Renderer.cpp +++ b/es-core/src/renderers/Renderer.cpp @@ -229,7 +229,8 @@ namespace Renderer viewport.y = screenOffsetY; viewport.w = screenWidth; viewport.h = screenHeight; - projection.orthoProjection(0, screenWidth, screenHeight, 0, -1.0, 1.0); + projection.orthoProjection(0.0f, static_cast(screenWidth), + static_cast(screenHeight), 0.0f, -1.0f, 1.0f); } break; case 1: { @@ -237,7 +238,8 @@ namespace Renderer viewport.y = screenOffsetX; viewport.w = screenHeight; viewport.h = screenWidth; - projection.orthoProjection(0, screenHeight, screenWidth, 0, -1.0, 1.0); + projection.orthoProjection(0.0f, static_cast(screenHeight), + static_cast(screenWidth), 0.0f, -1.0f, 1.0f); projection.rotate(static_cast(ES_DEG_TO_RAD(90)), {0, 0, 1}); projection.translate({0, screenHeight * -1.0f, 0}); } @@ -247,7 +249,8 @@ namespace Renderer viewport.y = windowHeight - screenOffsetY - screenHeight; viewport.w = screenWidth; viewport.h = screenHeight; - projection.orthoProjection(0, screenWidth, screenHeight, 0, -1.0, 1.0); + projection.orthoProjection(0.0f, static_cast(screenWidth), + static_cast(screenHeight), 0.0f, -1.0f, 1.0f); projection.rotate(static_cast(ES_DEG_TO_RAD(180)), {0, 0, 1}); projection.translate({screenWidth * -1.0f, screenHeight * -1.0f, 0}); } @@ -257,7 +260,8 @@ namespace Renderer viewport.y = windowHeight - screenOffsetX - screenWidth; viewport.w = screenHeight; viewport.h = screenWidth; - projection.orthoProjection(0, screenHeight, screenWidth, 0, -1.0, 1.0); + projection.orthoProjection(0.0f, static_cast(screenHeight), + static_cast(screenWidth), 0.0f, -1.0f, 1.0f); projection.rotate(static_cast(ES_DEG_TO_RAD(270)), {0, 0, 1}); projection.translate({screenWidth * -1.0f, 0, 0}); } diff --git a/es-core/src/renderers/Renderer_GL21.cpp b/es-core/src/renderers/Renderer_GL21.cpp index 34add5aec..06fd5e9d4 100644 --- a/es-core/src/renderers/Renderer_GL21.cpp +++ b/es-core/src/renderers/Renderer_GL21.cpp @@ -177,11 +177,11 @@ namespace Renderer GL_CHECK_ERROR(glBindTexture(GL_TEXTURE_2D, texture)); GL_CHECK_ERROR(glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, _repeat ? - GL_REPEAT : GL_CLAMP_TO_EDGE)); + static_cast(GL_REPEAT) : static_cast(GL_CLAMP_TO_EDGE))); GL_CHECK_ERROR(glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, _repeat ? - GL_REPEAT : GL_CLAMP_TO_EDGE)); + static_cast(GL_REPEAT) : static_cast(GL_CLAMP_TO_EDGE))); GL_CHECK_ERROR(glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, _linear ? - GL_LINEAR : GL_NEAREST)); + static_cast(GL_LINEAR) : static_cast(GL_NEAREST))); GL_CHECK_ERROR(glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST)); GL_CHECK_ERROR(glTexImage2D(GL_TEXTURE_2D, 0, type, _width, _height, 0, type, @@ -323,10 +323,10 @@ namespace Renderer if (_vertices->shaders & SHADER_SCANLINES) { Shader* runShader = getShaderProgram(SHADER_SCANLINES); - float shaderWidth = width * 1.2; + float shaderWidth = width * 1.2f; // Workaround to get the scanlines to render somehow proportional to the // resolution. A better solution is for sure needed. - float shaderHeight = height + height / (static_cast(height) >> 7) * 2.0; + float shaderHeight = height + height / (static_cast(height) >> 7) * 2.0f; if (runShader) { runShader->activateShaders(); runShader->setModelViewProjectionMatrix(getProjectionMatrix() * _trans); diff --git a/es-core/src/resources/Font.cpp b/es-core/src/resources/Font.cpp index 06930be0b..8bd4a7ff0 100644 --- a/es-core/src/resources/Font.cpp +++ b/es-core/src/resources/Font.cpp @@ -379,7 +379,8 @@ void Font::renderTextCache(TextCache* cache) auto vertexList = *it; Renderer::bindTexture(*it->textureIdPtr); - Renderer::drawTriangleStrips(&it->verts[0], it->verts.size()); + Renderer::drawTriangleStrips(&it->verts[0], + static_cast(it->verts.size())); } } diff --git a/es-core/src/resources/TextureData.cpp b/es-core/src/resources/TextureData.cpp index 511996a59..ba5d9d442 100644 --- a/es-core/src/resources/TextureData.cpp +++ b/es-core/src/resources/TextureData.cpp @@ -192,7 +192,8 @@ bool TextureData::uploadAndBind() // Upload texture. mTextureID = Renderer::createTexture(Renderer::Texture::RGBA, true, - mTile, mWidth, mHeight, mDataRGBA.data()); + mTile, static_cast(mWidth), + static_cast(mHeight), mDataRGBA.data()); } return true; } diff --git a/es-core/src/utils/FileSystemUtil.cpp b/es-core/src/utils/FileSystemUtil.cpp index 08e4cd1dd..a93e348f9 100644 --- a/es-core/src/utils/FileSystemUtil.cpp +++ b/es-core/src/utils/FileSystemUtil.cpp @@ -177,8 +177,6 @@ namespace Utils std::string getCWDPath() { - char temp[512]; - // Return current working directory. #if defined(_WIN64) wchar_t tempWide[512];