From 8cef306efb7e3d26fc09390f153b3a454d263837 Mon Sep 17 00:00:00 2001 From: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> Date: Mon, 16 Aug 2021 15:55:56 -0700 Subject: [PATCH] Code/Editor Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> --- Code/Editor/Util/Contrib/NvFloatMath.inl | 1 - Code/Editor/Util/ImageHistogram.cpp | 2 +- Code/Editor/Util/ImageTIF.cpp | 8 ++++---- Code/Editor/Util/PakFile.cpp | 2 +- Code/Editor/Util/VariablePropertyType.cpp | 2 +- 5 files changed, 7 insertions(+), 8 deletions(-) diff --git a/Code/Editor/Util/Contrib/NvFloatMath.inl b/Code/Editor/Util/Contrib/NvFloatMath.inl index 218d77b749..6bd3b9f7c5 100644 --- a/Code/Editor/Util/Contrib/NvFloatMath.inl +++ b/Code/Editor/Util/Contrib/NvFloatMath.inl @@ -103,7 +103,6 @@ it hasn't been integrated into this code drop yet. ** CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#pragma warning(disable:4996) class TVec { diff --git a/Code/Editor/Util/ImageHistogram.cpp b/Code/Editor/Util/ImageHistogram.cpp index 15f6bc2e47..acea2dc340 100644 --- a/Code/Editor/Util/ImageHistogram.cpp +++ b/Code/Editor/Util/ImageHistogram.cpp @@ -220,5 +220,5 @@ void CImageHistogram::ComputeStatisticsForChannel(int aIndex) } } - m_median[aIndex] = median; + m_median[aIndex] = static_cast(median); } diff --git a/Code/Editor/Util/ImageTIF.cpp b/Code/Editor/Util/ImageTIF.cpp index 6544b93c6a..7929d63030 100644 --- a/Code/Editor/Util/ImageTIF.cpp +++ b/Code/Editor/Util/ImageTIF.cpp @@ -79,7 +79,7 @@ libtiffDummySeekProc (thandle_t fd, toff_t off, int i) switch (i) { case SEEK_SET: - memImage->offset = off; + memImage->offset = static_cast(off); break; case SEEK_CUR: @@ -87,11 +87,11 @@ libtiffDummySeekProc (thandle_t fd, toff_t off, int i) break; case SEEK_END: - memImage->offset = memImage->size - off; + memImage->offset = static_cast(memImage->size - off); break; default: - memImage->offset = off; + memImage->offset = static_cast(off); break; } @@ -262,7 +262,7 @@ bool CImageTIF::Load(const QString& fileName, CFloatImage& outImage) } } - uint32 linesize = TIFFScanlineSize(tif); + uint32 linesize = static_cast(TIFFScanlineSize(tif)); uint8* linebuf = static_cast(_TIFFmalloc(linesize)); // We assume that a scanline has all of the samples in it. Validate the assumption. diff --git a/Code/Editor/Util/PakFile.cpp b/Code/Editor/Util/PakFile.cpp index 88d5598495..fc8431ef24 100644 --- a/Code/Editor/Util/PakFile.cpp +++ b/Code/Editor/Util/PakFile.cpp @@ -106,7 +106,7 @@ bool CPakFile::UpdateFile(const char* filename, CCryMemFile& file, bool bCompres { if (m_pArchive) { - int nSize = file.GetLength(); + int nSize = static_cast(file.GetLength()); UpdateFile(filename, file.GetMemPtr(), nSize, bCompress); file.Close(); diff --git a/Code/Editor/Util/VariablePropertyType.cpp b/Code/Editor/Util/VariablePropertyType.cpp index 17c80a505c..3f472dde72 100644 --- a/Code/Editor/Util/VariablePropertyType.cpp +++ b/Code/Editor/Util/VariablePropertyType.cpp @@ -171,7 +171,7 @@ namespace Prop { // Limit step size to 1000. int nPrec = max(3 - int(log(m_rangeMax - m_rangeMin) / log(10.f)), 0); - m_step = max(m_step, powf(10.f, -nPrec)); + m_step = max(m_step, powf(10.f, static_cast(-nPrec))); } }