Skip to content

Commit

Permalink
Fix compilation errors reported by clang
Browse files Browse the repository at this point in the history
  • Loading branch information
fungos committed Apr 29, 2018
1 parent 55b411f commit e61b58e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion OrionUO/Managers/PacketManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2251,7 +2251,7 @@ PACKET_HANDLER(UpdateSkills)
if (change)
{
char str[128] = { 0 };
sprintf_s(str, "Your skill in %s has %s by %.1f%%. It is now %.1f%%.", skill->Name.c_str(), ((change < 0) ? "decreased" : "increased"), abs(change), skill->BaseValue + change);
sprintf_s(str, "Your skill in %s has %s by %.1f%%. It is now %.1f%%.", skill->Name.c_str(), ((change < 0) ? "decreased" : "increased"), std::abs(change), skill->BaseValue + change);
//else if (change > 0) sprintf(str, "Your skill in %s has increased by %.1f%%. It is now %.1f%%.", UO->m_Skills[id].m_Name.c_str(), change, obj->GetSkillBaseValue(id) + change);
g_Orion.CreateTextMessage(TT_SYSTEM, 0, 3, 0x58, str);
}
Expand Down
5 changes: 4 additions & 1 deletion OrionUO/Managers/SoundManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,10 @@ HSTREAM CSoundManager::LoadSoundEffect(CIndexSound &is)
{
WISPFUN_DEBUG("c156_f7");
if (is.m_WaveFile.empty())
is.m_WaveFile.swap(CreateWaveFile(is));
{
auto wav = CreateWaveFile(is);
is.m_WaveFile.swap(wav);
}

size_t waveFileSize = is.DataSize - sizeof(SOUND_BLOCK) +sizeof(WaveHeader);

Expand Down
8 changes: 4 additions & 4 deletions OrionUO/Managers/UOFileReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -404,10 +404,10 @@ CGLTexture *UOFileReader::ReadArt(ushort id, CIndexObject &io, bool run)
{
if (pixels[pos++])
{
minX = min(minX, x);
maxX = max(maxX, x);
minY = min(minY, y);
maxY = max(maxY, y);
minX = min(minX, int(x));
maxX = max(maxX, int(x));
minY = min(minY, int(y));
maxY = max(maxY, int(y));
}
}
}
Expand Down

0 comments on commit e61b58e

Please sign in to comment.