Browse Source

Fix to Rectangle::intersects

tags/2021-05-28
jules 12 years ago
parent
commit
4c147d94a5
2 changed files with 6 additions and 13 deletions
  1. +4
    -12
      modules/juce_core/text/juce_String.cpp
  2. +2
    -1
      modules/juce_graphics/geometry/juce_Rectangle.h

+ 4
- 12
modules/juce_core/text/juce_String.cpp View File

@@ -243,8 +243,7 @@ void String::preallocateBytes (const size_t numBytesNeeded)
}
//==============================================================================
String::String() noexcept
: text (StringHolder::getEmpty())
String::String() noexcept : text (StringHolder::getEmpty())
{
}
@@ -473,7 +472,7 @@ namespace NumberToStringConverters
}
template <typename IntegerType>
String::CharPointerType createFromInteger (const IntegerType number)
static String::CharPointerType createFromInteger (const IntegerType number)
{
char buffer [32];
char* const end = buffer + numElementsInArray (buffer);
@@ -1897,15 +1896,8 @@ String String::toHexString (const void* const d, const int size, const int group
return s;
}
int String::getHexValue32() const noexcept
{
return HexConverter<int>::stringToHex (text);
}
int64 String::getHexValue64() const noexcept
{
return HexConverter<int64>::stringToHex (text);
}
int String::getHexValue32() const noexcept { return HexConverter<int> ::stringToHex (text); }
int64 String::getHexValue64() const noexcept { return HexConverter<int64>::stringToHex (text); }
//==============================================================================
String String::createStringFromData (const void* const data_, const int size)


+ 2
- 1
modules/juce_graphics/geometry/juce_Rectangle.h View File

@@ -496,7 +496,8 @@ public:
&& pos.y + h > other.pos.y
&& pos.x < other.pos.x + other.w
&& pos.y < other.pos.y + other.h
&& w > ValueType() && h > ValueType();
&& w > ValueType() && h > ValueType()
&& other.w > ValueType() && other.h > ValueType();
}
/** Returns the region that is the overlap between this and another rectangle.


Loading…
Cancel
Save