mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Cleaned up a few 64-bit VC++ warnings.
This commit is contained in:
parent
35da7fe473
commit
38703ee4c3
6 changed files with 17 additions and 14 deletions
|
|
@ -52,10 +52,10 @@ namespace WindowsFileHelpers
|
|||
if (path.isNotEmpty() && path[1] == ':' && path[2] == 0)
|
||||
path << '\\';
|
||||
|
||||
const int numBytes = CharPointer_UTF16::getBytesRequiredFor (path.getCharPointer()) + 4;
|
||||
const size_t numBytes = CharPointer_UTF16::getBytesRequiredFor (path.getCharPointer()) + 4;
|
||||
HeapBlock<WCHAR> pathCopy;
|
||||
pathCopy.calloc (numBytes, 1);
|
||||
path.copyToUTF16 (pathCopy, numBytes);
|
||||
path.copyToUTF16 (pathCopy, (int) numBytes);
|
||||
|
||||
if (PathStripToRoot (pathCopy))
|
||||
path = static_cast <const WCHAR*> (pathCopy);
|
||||
|
|
@ -169,10 +169,10 @@ bool File::moveToTrash() const
|
|||
return true;
|
||||
|
||||
// The string we pass in must be double null terminated..
|
||||
const int numBytes = CharPointer_UTF16::getBytesRequiredFor (fullPath.getCharPointer()) + 8;
|
||||
const size_t numBytes = CharPointer_UTF16::getBytesRequiredFor (fullPath.getCharPointer()) + 8;
|
||||
HeapBlock<WCHAR> doubleNullTermPath;
|
||||
doubleNullTermPath.calloc (numBytes, 1);
|
||||
fullPath.copyToUTF16 (doubleNullTermPath, numBytes);
|
||||
fullPath.copyToUTF16 (doubleNullTermPath, (int) numBytes);
|
||||
|
||||
SHFILEOPSTRUCT fos = { 0 };
|
||||
fos.wFunc = FO_DELETE;
|
||||
|
|
@ -704,7 +704,10 @@ bool Process::openDocument (const String& fileName, const String& parameters)
|
|||
|
||||
void File::revealToUser() const
|
||||
{
|
||||
#pragma warning (push)
|
||||
#pragma warning (disable: 4090) // (alignment warning)
|
||||
ITEMIDLIST* const itemIDList = ILCreateFromPath (fullPath.toWideCharPointer());
|
||||
#pragma warning (pop)
|
||||
|
||||
if (itemIDList != nullptr)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -162,7 +162,7 @@ String MemoryOutputStream::toString() const
|
|||
|
||||
OutputStream& JUCE_CALLTYPE operator<< (OutputStream& stream, const MemoryOutputStream& streamToRead)
|
||||
{
|
||||
stream.write (streamToRead.getData(), streamToRead.getDataSize());
|
||||
stream.write (streamToRead.getData(), (int) streamToRead.getDataSize());
|
||||
return stream;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -181,11 +181,11 @@ public:
|
|||
{
|
||||
MemoryBlock data (rng.nextInt (2000) + 1);
|
||||
|
||||
for (int k = data.getSize(); --k >= 0;)
|
||||
for (int k = (int) data.getSize(); --k >= 0;)
|
||||
data[k] = (char) rng.nextInt (255);
|
||||
|
||||
original.write (data.getData(), data.getSize());
|
||||
zipper .write (data.getData(), data.getSize());
|
||||
original.write (data.getData(), (int) data.getSize());
|
||||
zipper .write (data.getData(), (int) data.getSize());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3143,7 +3143,7 @@ defined(PNG_USER_TRANSFORM_PTR_SUPPORTED)
|
|||
if ((png_uint_32)png_ptr->rowbytes + 1 > (png_uint_32)65536L)
|
||||
png_error(png_ptr, "This image requires a row greater than 64KB");
|
||||
#endif
|
||||
if ((png_uint_32)png_ptr->rowbytes > (png_uint_32)(PNG_SIZE_MAX - 1))
|
||||
if ((png_uint_32)png_ptr->rowbytes > (png_uint_32) -2)
|
||||
png_error(png_ptr, "Row has too many bytes to allocate in memory.");
|
||||
png_ptr->prev_row = (png_bytep)png_malloc(png_ptr, (png_uint_32)(
|
||||
png_ptr->rowbytes + 1));
|
||||
|
|
|
|||
|
|
@ -136,10 +136,10 @@ public:
|
|||
const size_t len = textUTF32.length();
|
||||
|
||||
HeapBlock <UINT16> glyphIndices (len);
|
||||
dwFontFace->GetGlyphIndices (textUTF32, len, glyphIndices);
|
||||
dwFontFace->GetGlyphIndices (textUTF32, (UINT32) len, glyphIndices);
|
||||
|
||||
HeapBlock <DWRITE_GLYPH_METRICS> dwGlyphMetrics (len);
|
||||
dwFontFace->GetDesignGlyphMetrics (glyphIndices, len, dwGlyphMetrics, false);
|
||||
dwFontFace->GetDesignGlyphMetrics (glyphIndices, (UINT32) len, dwGlyphMetrics, false);
|
||||
|
||||
float x = 0;
|
||||
for (size_t i = 0; i < len; ++i)
|
||||
|
|
@ -156,9 +156,9 @@ public:
|
|||
const size_t len = textUTF32.length();
|
||||
|
||||
HeapBlock <UINT16> glyphIndices (len);
|
||||
dwFontFace->GetGlyphIndices (textUTF32, len, glyphIndices);
|
||||
dwFontFace->GetGlyphIndices (textUTF32, (UINT32) len, glyphIndices);
|
||||
HeapBlock <DWRITE_GLYPH_METRICS> dwGlyphMetrics (len);
|
||||
dwFontFace->GetDesignGlyphMetrics (glyphIndices, len, dwGlyphMetrics, false);
|
||||
dwFontFace->GetDesignGlyphMetrics (glyphIndices, (UINT32) len, dwGlyphMetrics, false);
|
||||
|
||||
float x = 0;
|
||||
for (size_t i = 0; i < len; ++i)
|
||||
|
|
|
|||
|
|
@ -959,7 +959,7 @@ private:
|
|||
// this name has to be different for each app/dll instance because otherwise poor old Windows can
|
||||
// get a bit confused (even despite it not being a process-global window class).
|
||||
String windowClassName ("JUCE_");
|
||||
windowClassName << (int) (Time::currentTimeMillis() & 0x7fffffff);
|
||||
windowClassName << String::toHexString (Time::currentTimeMillis());
|
||||
|
||||
HINSTANCE moduleHandle = (HINSTANCE) Process::getCurrentModuleInstanceHandle();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue