Browse Source

Minor clean-ups.

tags/2021-05-28
jules 13 years ago
parent
commit
2c5bfb952f
4 changed files with 4 additions and 7 deletions
  1. +2
    -2
      modules/juce_core/streams/juce_MemoryOutputStream.cpp
  2. +0
    -2
      modules/juce_gui_basics/drawables/juce_SVGParser.cpp
  3. +1
    -1
      modules/juce_gui_basics/menus/juce_PopupMenu.cpp
  4. +1
    -2
      modules/juce_gui_basics/widgets/juce_TextEditor.cpp

+ 2
- 2
modules/juce_core/streams/juce_MemoryOutputStream.cpp View File

@@ -136,8 +136,8 @@ int MemoryOutputStream::writeFromInputStream (InputStream& source, int64 maxNumB
if (availableData > 0)
{
if (maxNumBytesToWrite > 0 && maxNumBytesToWrite < availableData)
availableData = maxNumBytesToWrite;
if (maxNumBytesToWrite > availableData)
maxNumBytesToWrite = availableData;
preallocate (data.getSize() + (size_t) maxNumBytesToWrite);
}


+ 0
- 2
modules/juce_gui_basics/drawables/juce_SVGParser.cpp View File

@@ -1161,8 +1161,6 @@ private:
const double s2 = std::sqrt (s);
rx *= s2;
ry *= s2;
rx2 = rx * rx;
ry2 = ry * ry;
c = 0;
}


+ 1
- 1
modules/juce_gui_basics/menus/juce_PopupMenu.cpp View File

@@ -712,7 +712,7 @@ private:
if (totalW > maxMenuW)
{
numColumns = jmax (1, numColumns - 1);
totalW = workOutBestSize (maxMenuW); // to update col widths
workOutBestSize (maxMenuW); // to update col widths
break;
}
else if (totalW > maxMenuW / 2 || contentHeight < maxMenuH)


+ 1
- 2
modules/juce_gui_basics/widgets/juce_TextEditor.cpp View File

@@ -1787,11 +1787,10 @@ void TextEditor::mouseUp (const MouseEvent& e)
void TextEditor::mouseDoubleClick (const MouseEvent& e)
{
int tokenEnd = getTextIndexAt (e.x, e.y);
int tokenStart = tokenEnd;
int tokenStart = 0;
if (e.getNumberOfClicks() > 3)
{
tokenStart = 0;
tokenEnd = getTotalNumChars();
}
else


Loading…
Cancel
Save