Skip to content

Commit

Permalink
Fix two number conversion warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
codereader committed Mar 22, 2021
1 parent 9241f16 commit e4d995c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion radiant/ui/colourscheme/ColourSchemeEditor.cpp
Expand Up @@ -135,7 +135,7 @@ void ColourSchemeEditor::selectActiveScheme()
{
// Find a row matching the active colour scheme name
wxString name = GlobalColourSchemeManager().getActiveScheme().getName();
unsigned r = 0;
int r = 0;
for ( ; r < _schemeList->GetItemCount(); ++r)
{
wxString rowName = _schemeList->GetTextValue(r, 0);
Expand Down
2 changes: 1 addition & 1 deletion radiantcore/grid/GridManager.cpp
Expand Up @@ -227,7 +227,7 @@ void GridManager::setGridSize(GridSize gridSize)

float GridManager::getGridSize() const
{
return pow(2.0f, static_cast<int>(_activeGridSize));
return pow(2.0f, static_cast<float>(_activeGridSize));
}

int GridManager::getGridPower() const
Expand Down
4 changes: 2 additions & 2 deletions radiantcore/map/format/primitiveparsers/BrushDef.cpp
Expand Up @@ -250,8 +250,8 @@ Matrix4 LegacyBrushDefParser::getTexDef(std::string shader, float shiftS, float
TexturePtr texture = GlobalMaterialManager().getMaterial( shader )->getEditorImage();

if (texture) {
image_width = texture->getWidth();
image_height = texture->getHeight();
image_width = static_cast<float>(texture->getWidth());
image_height = static_cast<float>(texture->getHeight());
}

if (image_width == 0 || image_height == 0) {
Expand Down

0 comments on commit e4d995c

Please sign in to comment.