| @@ -19,7 +19,7 @@ ifeq ($(CONFIG),Debug) | |||||
| endif | endif | ||||
| CPPFLAGS := $(DEPFLAGS) -std=c++11 -D "LINUX=1" -D "DEBUG=1" -D "_DEBUG=1" -D "JUCER_LINUX_MAKE_7346DA2A=1" -D "JUCE_APP_VERSION=3.1.1" -D "JUCE_APP_VERSION_HEX=0x30101" -I /usr/include -I /usr/include/freetype2 -I ../../JuceLibraryCode -I ../../../../modules | CPPFLAGS := $(DEPFLAGS) -std=c++11 -D "LINUX=1" -D "DEBUG=1" -D "_DEBUG=1" -D "JUCER_LINUX_MAKE_7346DA2A=1" -D "JUCE_APP_VERSION=3.1.1" -D "JUCE_APP_VERSION_HEX=0x30101" -I /usr/include -I /usr/include/freetype2 -I ../../JuceLibraryCode -I ../../../../modules | ||||
| CFLAGS += $(CPPFLAGS) $(TARGET_ARCH) -g -ggdb -O0 -std=gnu++0x | |||||
| CFLAGS += $(CPPFLAGS) $(TARGET_ARCH) -g -ggdb -O0 -std=gnu++0x -Wreorder -Wuninitialized -Wunused-parameter -Wstrict-aliasing -Wshadow -Wsign-compare | |||||
| CXXFLAGS += $(CFLAGS) | CXXFLAGS += $(CFLAGS) | ||||
| LDFLAGS += $(TARGET_ARCH) -L$(BINDIR) -L$(LIBDIR) -L/usr/X11R6/lib/ -lX11 -lXext -lXinerama -ldl -lfreetype -lpthread -lrt | LDFLAGS += $(TARGET_ARCH) -L$(BINDIR) -L$(LIBDIR) -L/usr/X11R6/lib/ -lX11 -lXext -lXinerama -ldl -lfreetype -lpthread -lrt | ||||
| @@ -39,7 +39,7 @@ ifeq ($(CONFIG),Release) | |||||
| endif | endif | ||||
| CPPFLAGS := $(DEPFLAGS) -std=c++11 -D "LINUX=1" -D "NDEBUG=1" -D "JUCER_LINUX_MAKE_7346DA2A=1" -D "JUCE_APP_VERSION=3.1.1" -D "JUCE_APP_VERSION_HEX=0x30101" -I /usr/include -I /usr/include/freetype2 -I ../../JuceLibraryCode -I ../../../../modules | CPPFLAGS := $(DEPFLAGS) -std=c++11 -D "LINUX=1" -D "NDEBUG=1" -D "JUCER_LINUX_MAKE_7346DA2A=1" -D "JUCE_APP_VERSION=3.1.1" -D "JUCE_APP_VERSION_HEX=0x30101" -I /usr/include -I /usr/include/freetype2 -I ../../JuceLibraryCode -I ../../../../modules | ||||
| CFLAGS += $(CPPFLAGS) $(TARGET_ARCH) -O3 -std=gnu++0x | |||||
| CFLAGS += $(CPPFLAGS) $(TARGET_ARCH) -O3 -std=gnu++0x -Wreorder -Wuninitialized -Wunused-parameter -Wstrict-aliasing -Wshadow -Wsign-compare | |||||
| CXXFLAGS += $(CFLAGS) | CXXFLAGS += $(CFLAGS) | ||||
| LDFLAGS += $(TARGET_ARCH) -L$(BINDIR) -L$(LIBDIR) -fvisibility=hidden -L/usr/X11R6/lib/ -lX11 -lXext -lXinerama -ldl -lfreetype -lpthread -lrt | LDFLAGS += $(TARGET_ARCH) -L$(BINDIR) -L$(LIBDIR) -fvisibility=hidden -L/usr/X11R6/lib/ -lX11 -lXext -lXinerama -ldl -lfreetype -lpthread -lrt | ||||
| @@ -69,7 +69,7 @@ | |||||
| </MODULEPATHS> | </MODULEPATHS> | ||||
| </VS2008> | </VS2008> | ||||
| <LINUX_MAKE targetFolder="Builds/Linux" vstFolder="~/SDKs/vstsdk2.4" bigIcon="rVgowdy" | <LINUX_MAKE targetFolder="Builds/Linux" vstFolder="~/SDKs/vstsdk2.4" bigIcon="rVgowdy" | ||||
| extraCompilerFlags="-std=gnu++0x"> | |||||
| extraCompilerFlags="-std=gnu++0x -Wreorder -Wuninitialized -Wunused-parameter -Wstrict-aliasing -Wshadow -Wsign-compare"> | |||||
| <CONFIGURATIONS> | <CONFIGURATIONS> | ||||
| <CONFIGURATION name="Debug" isDebug="1" optimisation="1" targetName="Introjucer" | <CONFIGURATION name="Debug" isDebug="1" optimisation="1" targetName="Introjucer" | ||||
| libraryPath="/usr/X11R6/lib/" linuxArchitecture=""/> | libraryPath="/usr/X11R6/lib/" linuxArchitecture=""/> | ||||
| @@ -55,14 +55,14 @@ public: | |||||
| void resized() override | void resized() override | ||||
| { | { | ||||
| Rectangle<int> bounds = getLocalBounds(); | |||||
| Rectangle<int> r = getLocalBounds(); | |||||
| modulesLabel.setBounds (bounds.removeFromLeft (110)); | |||||
| modulesLabel.setBounds (r.removeFromLeft (110)); | |||||
| openFolderButton.setBounds (bounds.removeFromRight (40)); | |||||
| bounds.removeFromRight (5); | |||||
| openFolderButton.setBounds (r.removeFromRight (40)); | |||||
| r.removeFromRight (5); | |||||
| currentPathBox.setBounds (bounds); | |||||
| currentPathBox.setBounds (r); | |||||
| } | } | ||||
| static bool selectJuceFolder (File& result) | static bool selectJuceFolder (File& result) | ||||
| @@ -55,34 +55,34 @@ public: | |||||
| void paintButton (Graphics& g, bool isMouseOverButton, bool /*isButtonDown*/) override | void paintButton (Graphics& g, bool isMouseOverButton, bool /*isButtonDown*/) override | ||||
| { | { | ||||
| const Rectangle<float> bounds (getLocalBounds().toFloat()); | |||||
| const Rectangle<float> r (getLocalBounds().toFloat()); | |||||
| const Colour buttonColour (0xfff29300); | const Colour buttonColour (0xfff29300); | ||||
| if (isMouseOverButton) | if (isMouseOverButton) | ||||
| { | { | ||||
| if (getStyle() == ImageFitted) | if (getStyle() == ImageFitted) | ||||
| { | { | ||||
| hoverBackground->drawWithin (g, bounds, RectanglePlacement::centred, 1.0); | |||||
| thumb->drawWithin (g, bounds, RectanglePlacement::centred, 1.0); | |||||
| hoverBackground->drawWithin (g, r, RectanglePlacement::centred, 1.0); | |||||
| thumb->drawWithin (g, r, RectanglePlacement::centred, 1.0); | |||||
| } | } | ||||
| else | else | ||||
| { | { | ||||
| g.setColour (buttonColour.withAlpha (0.3f)); | g.setColour (buttonColour.withAlpha (0.3f)); | ||||
| g.fillRoundedRectangle (bounds.reduced (2.0f, 2.0f), 10.0f); | |||||
| g.fillRoundedRectangle (r.reduced (2.0f, 2.0f), 10.0f); | |||||
| g.setColour (buttonColour); | g.setColour (buttonColour); | ||||
| g.drawRoundedRectangle (bounds.reduced (2.0f, 2.0f), 10.0f, 2.0f); | |||||
| g.drawRoundedRectangle (r.reduced (2.0f, 2.0f), 10.0f, 2.0f); | |||||
| } | } | ||||
| } | } | ||||
| else | else | ||||
| { | { | ||||
| if (getStyle() == ImageFitted) | if (getStyle() == ImageFitted) | ||||
| { | { | ||||
| thumb->drawWithin (g, bounds, RectanglePlacement::centred, 1.0); | |||||
| thumb->drawWithin (g, r, RectanglePlacement::centred, 1.0); | |||||
| } | } | ||||
| else | else | ||||
| { | { | ||||
| g.setColour (buttonColour); | g.setColour (buttonColour); | ||||
| g.drawRoundedRectangle (bounds.reduced (2.0f, 2.0f), 10.0f, 2.0f); | |||||
| g.drawRoundedRectangle (r.reduced (2.0f, 2.0f), 10.0f, 2.0f); | |||||
| } | } | ||||
| } | } | ||||
| @@ -95,7 +95,7 @@ public: | |||||
| } | } | ||||
| else | else | ||||
| { | { | ||||
| textTarget = RectanglePlacement (RectanglePlacement::centred).appliedTo (thumb->getDrawableBounds(), bounds); | |||||
| textTarget = RectanglePlacement (RectanglePlacement::centred).appliedTo (thumb->getDrawableBounds(), r); | |||||
| textTarget = textTarget.removeFromBottom (textTarget.getHeight() * 0.3f); | textTarget = textTarget.removeFromBottom (textTarget.getHeight() * 0.3f); | ||||
| } | } | ||||
| @@ -333,7 +333,7 @@ private: | |||||
| if (countdown <= 0) | if (countdown <= 0) | ||||
| currentValue = target; | currentValue = target; | ||||
| else | else | ||||
| step = (target - currentValue) / countdown; | |||||
| step = (target - currentValue) / (float) countdown; | |||||
| } | } | ||||
| } | } | ||||
| @@ -57,7 +57,7 @@ int FileInputStream::read (void* buffer, int bytesToRead) | |||||
| jassert (buffer != nullptr && bytesToRead >= 0); | jassert (buffer != nullptr && bytesToRead >= 0); | ||||
| const size_t num = readInternal (buffer, (size_t) bytesToRead); | const size_t num = readInternal (buffer, (size_t) bytesToRead); | ||||
| currentPosition += num; | |||||
| currentPosition += (int64) num; | |||||
| return (int) num; | return (int) num; | ||||
| } | } | ||||
| @@ -90,7 +90,7 @@ bool FileOutputStream::write (const void* const src, const size_t numBytes) | |||||
| { | { | ||||
| memcpy (buffer + bytesInBuffer, src, numBytes); | memcpy (buffer + bytesInBuffer, src, numBytes); | ||||
| bytesInBuffer += numBytes; | bytesInBuffer += numBytes; | ||||
| currentPosition += numBytes; | |||||
| currentPosition += (int64) numBytes; | |||||
| } | } | ||||
| else | else | ||||
| { | { | ||||
| @@ -101,7 +101,7 @@ bool FileOutputStream::write (const void* const src, const size_t numBytes) | |||||
| { | { | ||||
| memcpy (buffer + bytesInBuffer, src, numBytes); | memcpy (buffer + bytesInBuffer, src, numBytes); | ||||
| bytesInBuffer += numBytes; | bytesInBuffer += numBytes; | ||||
| currentPosition += numBytes; | |||||
| currentPosition += (int64) numBytes; | |||||
| } | } | ||||
| else | else | ||||
| { | { | ||||
| @@ -110,7 +110,7 @@ bool FileOutputStream::write (const void* const src, const size_t numBytes) | |||||
| if (bytesWritten < 0) | if (bytesWritten < 0) | ||||
| return false; | return false; | ||||
| currentPosition += bytesWritten; | |||||
| currentPosition += (int64) bytesWritten; | |||||
| return bytesWritten == (ssize_t) numBytes; | return bytesWritten == (ssize_t) numBytes; | ||||
| } | } | ||||
| } | } | ||||
| @@ -126,7 +126,7 @@ bool FileOutputStream::writeRepeatedByte (uint8 byte, size_t numBytes) | |||||
| { | { | ||||
| memset (buffer + bytesInBuffer, byte, numBytes); | memset (buffer + bytesInBuffer, byte, numBytes); | ||||
| bytesInBuffer += numBytes; | bytesInBuffer += numBytes; | ||||
| currentPosition += numBytes; | |||||
| currentPosition += (int64) numBytes; | |||||
| return true; | return true; | ||||
| } | } | ||||
| @@ -153,7 +153,7 @@ inline uint64 ByteOrder::swap (uint64 value) noexcept | |||||
| #elif JUCE_USE_MSVC_INTRINSICS | #elif JUCE_USE_MSVC_INTRINSICS | ||||
| return _byteswap_uint64 (value); | return _byteswap_uint64 (value); | ||||
| #else | #else | ||||
| return (((int64) swap ((uint32) value)) << 32) | swap ((uint32) (value >> 32)); | |||||
| return (((uint64) swap ((uint32) value)) << 32) | swap ((uint32) (value >> 32)); | |||||
| #endif | #endif | ||||
| } | } | ||||
| @@ -259,7 +259,7 @@ void MemoryBlock::copyTo (void* const dst, int offset, size_t num) const noexcep | |||||
| if ((size_t) offset + num > size) | if ((size_t) offset + num > size) | ||||
| { | { | ||||
| const size_t newNum = size - (size_t) offset; | |||||
| const size_t newNum = (size_t) size - (size_t) offset; | |||||
| zeromem (d + newNum, num - newNum); | zeromem (d + newNum, num - newNum); | ||||
| num = newNum; | num = newNum; | ||||
| } | } | ||||
| @@ -182,7 +182,7 @@ private: | |||||
| } | } | ||||
| int createConnection (URL::OpenStreamProgressCallback* progressCallback, void* progressCallbackContext, | int createConnection (URL::OpenStreamProgressCallback* progressCallback, void* progressCallbackContext, | ||||
| const int numRedirectsToFollow) | |||||
| const int numRedirects) | |||||
| { | { | ||||
| closeSocket (false); | closeSocket (false); | ||||
| @@ -279,7 +279,7 @@ private: | |||||
| String location (findHeaderItem (headerLines, "Location:")); | String location (findHeaderItem (headerLines, "Location:")); | ||||
| if (++levelsOfRedirection <= numRedirectsToFollow | |||||
| if (++levelsOfRedirection <= numRedirects | |||||
| && status >= 300 && status < 400 | && status >= 300 && status < 400 | ||||
| && location.isNotEmpty() && location != address) | && location.isNotEmpty() && location != address) | ||||
| { | { | ||||
| @@ -295,7 +295,7 @@ private: | |||||
| } | } | ||||
| address = location; | address = location; | ||||
| return createConnection (progressCallback, progressCallbackContext, numRedirectsToFollow); | |||||
| return createConnection (progressCallback, progressCallbackContext, numRedirects); | |||||
| } | } | ||||
| return status; | return status; | ||||
| @@ -126,7 +126,7 @@ static void findIPAddresses (int sock, Array<IPAddress>& result) | |||||
| cfg.ifc_buf += IFNAMSIZ + cfg.ifc_req->ifr_addr.sa_len; | cfg.ifc_buf += IFNAMSIZ + cfg.ifc_req->ifr_addr.sa_len; | ||||
| } | } | ||||
| #else | #else | ||||
| for (size_t i = 0; i < cfg.ifc_len / sizeof (struct ifreq); ++i) | |||||
| for (size_t i = 0; i < (size_t) cfg.ifc_len / (size_t) sizeof (struct ifreq); ++i) | |||||
| { | { | ||||
| const ifreq& item = cfg.ifc_req[i]; | const ifreq& item = cfg.ifc_req[i]; | ||||
| @@ -511,7 +511,7 @@ public: | |||||
| if (byte < 0) | if (byte < 0) | ||||
| { | { | ||||
| uint8 bit = 0x40; | |||||
| int bit = 0x40; | |||||
| int numExtraValues = 0; | int numExtraValues = 0; | ||||
| while ((byte & bit) != 0) | while ((byte & bit) != 0) | ||||
| @@ -34,18 +34,18 @@ | |||||
| juce_wchar CharacterFunctions::toUpperCase (const juce_wchar character) noexcept | juce_wchar CharacterFunctions::toUpperCase (const juce_wchar character) noexcept | ||||
| { | { | ||||
| return towupper ((wchar_t) character); | |||||
| return (juce_wchar) towupper ((wint_t) character); | |||||
| } | } | ||||
| juce_wchar CharacterFunctions::toLowerCase (const juce_wchar character) noexcept | juce_wchar CharacterFunctions::toLowerCase (const juce_wchar character) noexcept | ||||
| { | { | ||||
| return towlower ((wchar_t) character); | |||||
| return (juce_wchar) towlower ((wint_t) character); | |||||
| } | } | ||||
| bool CharacterFunctions::isUpperCase (const juce_wchar character) noexcept | bool CharacterFunctions::isUpperCase (const juce_wchar character) noexcept | ||||
| { | { | ||||
| #if JUCE_WINDOWS | #if JUCE_WINDOWS | ||||
| return iswupper ((wchar_t) character) != 0; | |||||
| return iswupper ((wint_t) character) != 0; | |||||
| #else | #else | ||||
| return toLowerCase (character) != character; | return toLowerCase (character) != character; | ||||
| #endif | #endif | ||||
| @@ -54,7 +54,7 @@ bool CharacterFunctions::isUpperCase (const juce_wchar character) noexcept | |||||
| bool CharacterFunctions::isLowerCase (const juce_wchar character) noexcept | bool CharacterFunctions::isLowerCase (const juce_wchar character) noexcept | ||||
| { | { | ||||
| #if JUCE_WINDOWS | #if JUCE_WINDOWS | ||||
| return iswlower ((wchar_t) character) != 0; | |||||
| return iswlower ((wint_t) character) != 0; | |||||
| #else | #else | ||||
| return toUpperCase (character) != character; | return toUpperCase (character) != character; | ||||
| #endif | #endif | ||||
| @@ -72,7 +72,7 @@ bool CharacterFunctions::isWhitespace (const char character) noexcept | |||||
| bool CharacterFunctions::isWhitespace (const juce_wchar character) noexcept | bool CharacterFunctions::isWhitespace (const juce_wchar character) noexcept | ||||
| { | { | ||||
| return iswspace ((wchar_t) character) != 0; | |||||
| return iswspace ((wint_t) character) != 0; | |||||
| } | } | ||||
| bool CharacterFunctions::isDigit (const char character) noexcept | bool CharacterFunctions::isDigit (const char character) noexcept | ||||
| @@ -82,7 +82,7 @@ bool CharacterFunctions::isDigit (const char character) noexcept | |||||
| bool CharacterFunctions::isDigit (const juce_wchar character) noexcept | bool CharacterFunctions::isDigit (const juce_wchar character) noexcept | ||||
| { | { | ||||
| return iswdigit ((wchar_t) character) != 0; | |||||
| return iswdigit ((wint_t) character) != 0; | |||||
| } | } | ||||
| bool CharacterFunctions::isLetter (const char character) noexcept | bool CharacterFunctions::isLetter (const char character) noexcept | ||||
| @@ -93,7 +93,7 @@ bool CharacterFunctions::isLetter (const char character) noexcept | |||||
| bool CharacterFunctions::isLetter (const juce_wchar character) noexcept | bool CharacterFunctions::isLetter (const juce_wchar character) noexcept | ||||
| { | { | ||||
| return iswalpha ((wchar_t) character) != 0; | |||||
| return iswalpha ((wint_t) character) != 0; | |||||
| } | } | ||||
| bool CharacterFunctions::isLetterOrDigit (const char character) noexcept | bool CharacterFunctions::isLetterOrDigit (const char character) noexcept | ||||
| @@ -105,7 +105,7 @@ bool CharacterFunctions::isLetterOrDigit (const char character) noexcept | |||||
| bool CharacterFunctions::isLetterOrDigit (const juce_wchar character) noexcept | bool CharacterFunctions::isLetterOrDigit (const juce_wchar character) noexcept | ||||
| { | { | ||||
| return iswalnum ((wchar_t) character) != 0; | |||||
| return iswalnum ((wint_t) character) != 0; | |||||
| } | } | ||||
| int CharacterFunctions::getHexDigitValue (const juce_wchar digit) noexcept | int CharacterFunctions::getHexDigitValue (const juce_wchar digit) noexcept | ||||
| @@ -571,7 +571,7 @@ local void gen_codes (ct_data *tree, /* the tree to decorate */ | |||||
| ushf *bl_count) /* number of codes at each bit length */ | ushf *bl_count) /* number of codes at each bit length */ | ||||
| { | { | ||||
| ush next_code[MAX_BITS+1]; /* next code value for each bit length */ | ush next_code[MAX_BITS+1]; /* next code value for each bit length */ | ||||
| ush code = 0; /* running code value */ | |||||
| ush code_ = 0; /* running code value */ | |||||
| int bits; /* bit index */ | int bits; /* bit index */ | ||||
| int n; /* code index */ | int n; /* code index */ | ||||
| @@ -579,12 +579,12 @@ local void gen_codes (ct_data *tree, /* the tree to decorate */ | |||||
| * without bit reversal. | * without bit reversal. | ||||
| */ | */ | ||||
| for (bits = 1; bits <= MAX_BITS; bits++) { | for (bits = 1; bits <= MAX_BITS; bits++) { | ||||
| next_code[bits] = code = (code + bl_count[bits-1]) << 1; | |||||
| next_code[bits] = code_ = (code_ + bl_count[bits-1]) << 1; | |||||
| } | } | ||||
| /* Check that the bit counts in bl_count are consistent. The last code | /* Check that the bit counts in bl_count are consistent. The last code | ||||
| * must be all ones. | * must be all ones. | ||||
| */ | */ | ||||
| Assert (code + bl_count[MAX_BITS]-1 == (1<<MAX_BITS)-1, | |||||
| Assert (code_ + bl_count[MAX_BITS]-1 == (1<<MAX_BITS)-1, | |||||
| "inconsistent bit counts"); | "inconsistent bit counts"); | ||||
| Tracev((stderr,"\ngen_codes: max_code %d ", max_code)); | Tracev((stderr,"\ngen_codes: max_code %d ", max_code)); | ||||
| @@ -1055,7 +1055,7 @@ local void compress_block (deflate_state *s, | |||||
| unsigned dist; /* distance of matched string */ | unsigned dist; /* distance of matched string */ | ||||
| int lc; /* match length or unmatched char (if dist == 0) */ | int lc; /* match length or unmatched char (if dist == 0) */ | ||||
| unsigned lx = 0; /* running index in l_buf */ | unsigned lx = 0; /* running index in l_buf */ | ||||
| unsigned code; /* the code to send */ | |||||
| unsigned code_; /* the code to send */ | |||||
| int extra; /* number of extra bits to send */ | int extra; /* number of extra bits to send */ | ||||
| if (s->last_lit != 0) do { | if (s->last_lit != 0) do { | ||||
| @@ -1066,21 +1066,21 @@ local void compress_block (deflate_state *s, | |||||
| Tracecv(isgraph(lc), (stderr," '%c' ", lc)); | Tracecv(isgraph(lc), (stderr," '%c' ", lc)); | ||||
| } else { | } else { | ||||
| /* Here, lc is the match length - MIN_MATCH */ | /* Here, lc is the match length - MIN_MATCH */ | ||||
| code = _length_code[lc]; | |||||
| send_code(s, code+LITERALS+1, ltree); /* send the length code */ | |||||
| extra = extra_lbits[code]; | |||||
| code_ = _length_code[lc]; | |||||
| send_code(s, code_+LITERALS+1, ltree); /* send the length code */ | |||||
| extra = extra_lbits[code_]; | |||||
| if (extra != 0) { | if (extra != 0) { | ||||
| lc -= base_length[code]; | |||||
| lc -= base_length[code_]; | |||||
| send_bits(s, lc, extra); /* send the extra length bits */ | send_bits(s, lc, extra); /* send the extra length bits */ | ||||
| } | } | ||||
| dist--; /* dist is now the match distance - 1 */ | dist--; /* dist is now the match distance - 1 */ | ||||
| code = d_code(dist); | |||||
| Assert (code < D_CODES, "bad d_code"); | |||||
| code_ = d_code(dist); | |||||
| Assert (code_ < D_CODES, "bad d_code"); | |||||
| send_code(s, code, dtree); /* send the distance code */ | |||||
| extra = extra_dbits[code]; | |||||
| send_code(s, code_, dtree); /* send the distance code */ | |||||
| extra = extra_dbits[code_]; | |||||
| if (extra != 0) { | if (extra != 0) { | ||||
| dist -= base_dist[code]; | |||||
| dist -= base_dist[code_]; | |||||
| send_bits(s, dist, extra); /* send the extra distance bits */ | send_bits(s, dist, extra); /* send the extra distance bits */ | ||||
| } | } | ||||
| } /* literal or match pair ? */ | } /* literal or match pair ? */ | ||||
| @@ -1120,12 +1120,12 @@ local void set_data_type (deflate_state *s) | |||||
| * method would use a table) | * method would use a table) | ||||
| * IN assertion: 1 <= len <= 15 | * IN assertion: 1 <= len <= 15 | ||||
| */ | */ | ||||
| local unsigned bi_reverse (unsigned code, int len) | |||||
| local unsigned bi_reverse (unsigned code_, int len) | |||||
| { | { | ||||
| register unsigned res = 0; | register unsigned res = 0; | ||||
| do { | do { | ||||
| res |= code & 1; | |||||
| code >>= 1, res <<= 1; | |||||
| res |= code_ & 1; | |||||
| code_ >>= 1, res <<= 1; | |||||
| } while (--len > 0); | } while (--len > 0); | ||||
| return res >> 1; | return res >> 1; | ||||
| } | } | ||||
| @@ -107,7 +107,7 @@ public: | |||||
| template <class Pixel> | template <class Pixel> | ||||
| forcedinline void blend (const Pixel& src) noexcept | forcedinline void blend (const Pixel& src) noexcept | ||||
| { | { | ||||
| const uint32 alpha = 0x100 - src.getAlpha(); | |||||
| const uint32 alpha = (uint32) (0x100 - src.getAlpha()); | |||||
| uint32 rb = src.getRB() + maskPixelComponents (getRB() * alpha); | uint32 rb = src.getRB() + maskPixelComponents (getRB() * alpha); | ||||
| uint32 ag = src.getAG() + maskPixelComponents (getAG() * alpha); | uint32 ag = src.getAG() + maskPixelComponents (getAG() * alpha); | ||||
| argb = clampPixelComponents (rb) + (clampPixelComponents (ag) << 8); | argb = clampPixelComponents (rb) + (clampPixelComponents (ag) << 8); | ||||
| @@ -234,9 +234,9 @@ public: | |||||
| } | } | ||||
| else | else | ||||
| { | { | ||||
| components.b = (uint8) jmin ((uint32) 0xff, (components.b * 0xff) / alpha); | |||||
| components.g = (uint8) jmin ((uint32) 0xff, (components.g * 0xff) / alpha); | |||||
| components.r = (uint8) jmin ((uint32) 0xff, (components.r * 0xff) / alpha); | |||||
| components.b = (uint8) jmin ((uint32) 0xffu, (components.b * 0xffu) / alpha); | |||||
| components.g = (uint8) jmin ((uint32) 0xffu, (components.g * 0xffu) / alpha); | |||||
| components.r = (uint8) jmin ((uint32) 0xffu, (components.r * 0xffu) / alpha); | |||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| @@ -350,7 +350,7 @@ public: | |||||
| template <class Pixel> | template <class Pixel> | ||||
| forcedinline void blend (const Pixel& src) noexcept | forcedinline void blend (const Pixel& src) noexcept | ||||
| { | { | ||||
| const uint32 alpha = 0x100 - src.getAlpha(); | |||||
| const uint32 alpha = (uint32) (0x100 - src.getAlpha()); | |||||
| uint32 rb = clampPixelComponents (src.getRB() + maskPixelComponents (getRB() * alpha)); | uint32 rb = clampPixelComponents (src.getRB() + maskPixelComponents (getRB() * alpha)); | ||||
| uint32 ag = src.getAG() + (g * alpha >> 8); | uint32 ag = src.getAG() + (g * alpha >> 8); | ||||
| @@ -433,12 +433,12 @@ namespace GradientPixelIterators | |||||
| if (vertical) | if (vertical) | ||||
| { | { | ||||
| scale = roundToInt ((numEntries << (int) numScaleBits) / (double) (p2.y - p1.y)); | scale = roundToInt ((numEntries << (int) numScaleBits) / (double) (p2.y - p1.y)); | ||||
| start = roundToInt (p1.y * scale); | |||||
| start = roundToInt (p1.y * (float) scale); | |||||
| } | } | ||||
| else if (horizontal) | else if (horizontal) | ||||
| { | { | ||||
| scale = roundToInt ((numEntries << (int) numScaleBits) / (double) (p2.x - p1.x)); | scale = roundToInt ((numEntries << (int) numScaleBits) / (double) (p2.x - p1.x)); | ||||
| start = roundToInt (p1.x * scale); | |||||
| start = roundToInt (p1.x * (float) scale); | |||||
| } | } | ||||
| else | else | ||||
| { | { | ||||
| @@ -534,8 +534,9 @@ namespace GradientPixelIterators | |||||
| forcedinline void setY (const int y) noexcept | forcedinline void setY (const int y) noexcept | ||||
| { | { | ||||
| lineYM01 = inverseTransform.mat01 * y + inverseTransform.mat02 - gx1; | |||||
| lineYM11 = inverseTransform.mat11 * y + inverseTransform.mat12 - gy1; | |||||
| const float floatY = (float) y; | |||||
| lineYM01 = inverseTransform.mat01 * floatY + inverseTransform.mat02 - gx1; | |||||
| lineYM11 = inverseTransform.mat11 * floatY + inverseTransform.mat12 - gy1; | |||||
| } | } | ||||
| inline PixelARGB getPixel (const int px) const noexcept | inline PixelARGB getPixel (const int px) const noexcept | ||||
| @@ -1301,7 +1302,7 @@ namespace EdgeTableFillers | |||||
| sx += pixelOffset; | sx += pixelOffset; | ||||
| sy += pixelOffset; | sy += pixelOffset; | ||||
| float x1 = sx, y1 = sy; | float x1 = sx, y1 = sy; | ||||
| sx += numPixels; | |||||
| sx += (float) numPixels; | |||||
| inverseTransform.transformPoints (x1, y1, sx, sy); | inverseTransform.transformPoints (x1, y1, sx, sy); | ||||
| xBresenham.set ((int) (x1 * 256.0f), (int) (sx * 256.0f), numPixels, pixelOffsetInt); | xBresenham.set ((int) (x1 * 256.0f), (int) (sx * 256.0f), numPixels, pixelOffsetInt); | ||||
| @@ -307,9 +307,9 @@ public: | |||||
| faceWrapper->face->style_name); | faceWrapper->face->style_name); | ||||
| } | } | ||||
| void initialiseCharacteristics (const String& name, const String& style) | |||||
| void initialiseCharacteristics (const String& fontName, const String& fontStyle) | |||||
| { | { | ||||
| setCharacteristics (name, style, | |||||
| setCharacteristics (fontName, fontStyle, | |||||
| faceWrapper->face->ascender / (float) (faceWrapper->face->ascender - faceWrapper->face->descender), | faceWrapper->face->ascender / (float) (faceWrapper->face->ascender - faceWrapper->face->descender), | ||||
| L' '); | L' '); | ||||
| } | } | ||||
| @@ -587,15 +587,15 @@ public: | |||||
| if (imageDepth == 16) | if (imageDepth == 16) | ||||
| { | { | ||||
| const int pixelStride = 2; | |||||
| const int lineStride = ((w * pixelStride + 3) & ~3); | |||||
| const int pixStride = 2; | |||||
| const int stride = ((w * pixStride + 3) & ~3); | |||||
| imageData16Bit.malloc (lineStride * h); | |||||
| imageData16Bit.malloc (stride * h); | |||||
| xImage->data = imageData16Bit; | xImage->data = imageData16Bit; | ||||
| xImage->bitmap_pad = 16; | xImage->bitmap_pad = 16; | ||||
| xImage->depth = pixelStride * 8; | |||||
| xImage->bytes_per_line = lineStride; | |||||
| xImage->bits_per_pixel = pixelStride * 8; | |||||
| xImage->depth = pixStride * 8; | |||||
| xImage->bytes_per_line = stride; | |||||
| xImage->bits_per_pixel = pixStride * 8; | |||||
| xImage->red_mask = visual->red_mask; | xImage->red_mask = visual->red_mask; | ||||
| xImage->green_mask = visual->green_mask; | xImage->green_mask = visual->green_mask; | ||||
| xImage->blue_mask = visual->blue_mask; | xImage->blue_mask = visual->blue_mask; | ||||
| @@ -1143,11 +1143,11 @@ public: | |||||
| ::Window root, child; | ::Window root, child; | ||||
| int wx, wy; | int wx, wy; | ||||
| unsigned int ww, wh, bw, depth; | |||||
| unsigned int ww, wh, bw, bitDepth; | |||||
| ScopedXLock xlock; | ScopedXLock xlock; | ||||
| return XGetGeometry (display, (::Drawable) windowH, &root, &wx, &wy, &ww, &wh, &bw, &depth) | |||||
| return XGetGeometry (display, (::Drawable) windowH, &root, &wx, &wy, &ww, &wh, &bw, &bitDepth) | |||||
| && XTranslateCoordinates (display, windowH, windowH, localPos.getX(), localPos.getY(), &wx, &wy, &child) | && XTranslateCoordinates (display, windowH, windowH, localPos.getX(), localPos.getY(), &wx, &wy, &child) | ||||
| && child == None; | && child == None; | ||||
| } | } | ||||
| @@ -2384,11 +2384,11 @@ private: | |||||
| { | { | ||||
| Window root, child; | Window root, child; | ||||
| int wx = 0, wy = 0; | int wx = 0, wy = 0; | ||||
| unsigned int ww = 0, wh = 0, bw, depth; | |||||
| unsigned int ww = 0, wh = 0, bw, bitDepth; | |||||
| ScopedXLock xlock; | ScopedXLock xlock; | ||||
| if (XGetGeometry (display, (::Drawable) windowH, &root, &wx, &wy, &ww, &wh, &bw, &depth)) | |||||
| if (XGetGeometry (display, (::Drawable) windowH, &root, &wx, &wy, &ww, &wh, &bw, &bitDepth)) | |||||
| if (! XTranslateCoordinates (display, windowH, root, 0, 0, &wx, &wy, &child)) | if (! XTranslateCoordinates (display, windowH, root, 0, 0, &wx, &wy, &child)) | ||||
| wx = wy = 0; | wx = wy = 0; | ||||
| @@ -3009,10 +3009,10 @@ ModifierKeys ModifierKeys::getCurrentModifiersRealtime() noexcept | |||||
| //============================================================================== | //============================================================================== | ||||
| void Desktop::setKioskComponent (Component* kioskModeComponent, bool enableOrDisable, bool /* allowMenusAndBars */) | |||||
| void Desktop::setKioskComponent (Component* comp, bool enableOrDisable, bool /* allowMenusAndBars */) | |||||
| { | { | ||||
| if (enableOrDisable) | if (enableOrDisable) | ||||
| kioskModeComponent->setBounds (getDisplays().getMainDisplay().totalArea); | |||||
| comp->setBounds (getDisplays().getMainDisplay().totalArea); | |||||
| } | } | ||||
| //============================================================================== | //============================================================================== | ||||