Browse Source

Fixed a couple of base-class copying typos and prevented copying of ReferenceCountedObject bases.

tags/2021-05-28
jules 12 years ago
parent
commit
136041daa7
4 changed files with 10 additions and 6 deletions
  1. +4
    -0
      modules/juce_core/memory/juce_ReferenceCountedObject.h
  2. +3
    -3
      modules/juce_data_structures/values/juce_ValueTree.cpp
  3. +1
    -1
      modules/juce_graphics/fonts/juce_Font.cpp
  4. +2
    -2
      modules/juce_graphics/native/juce_RenderingHelpers.h

+ 4
- 0
modules/juce_core/memory/juce_ReferenceCountedObject.h View File

@@ -116,6 +116,8 @@ protected:
private:
//==============================================================================
Atomic <int> refCount;
JUCE_DECLARE_NON_COPYABLE (ReferenceCountedObject)
};
@@ -175,6 +177,8 @@ protected:
private:
//==============================================================================
int refCount;
JUCE_DECLARE_NON_COPYABLE (SingleThreadedReferenceCountedObject)
};


+ 3
- 3
modules/juce_data_structures/values/juce_ValueTree.cpp View File

@@ -28,13 +28,13 @@ class ValueTree::SharedObject : public ReferenceCountedObject
public:
typedef ReferenceCountedObjectPtr<SharedObject> Ptr;
explicit SharedObject (const Identifier& type_) noexcept
: type (type_), parent (nullptr)
explicit SharedObject (const Identifier& t) noexcept
: type (t), parent (nullptr)
{
}
SharedObject (const SharedObject& other)
: ReferenceCountedObject (other),
: ReferenceCountedObject(),
type (other.type), properties (other.properties), parent (nullptr)
{
for (int i = 0; i < other.children.size(); ++i)


+ 1
- 1
modules/juce_graphics/fonts/juce_Font.cpp View File

@@ -216,7 +216,7 @@ public:
}
SharedFontInternal (const SharedFontInternal& other) noexcept
: ReferenceCountedObject (other),
: ReferenceCountedObject(),
typefaceName (other.typefaceName),
typefaceStyle (other.typefaceStyle),
height (other.height),


+ 2
- 2
modules/juce_graphics/native/juce_RenderingHelpers.h View File

@@ -1578,7 +1578,7 @@ namespace ClipRegions
EdgeTableRegion (const Rectangle<float>& r) : edgeTable (r) {}
EdgeTableRegion (const RectangleList& r) : edgeTable (r) {}
EdgeTableRegion (const Rectangle<int>& bounds, const Path& p, const AffineTransform& t) : edgeTable (bounds, p, t) {}
EdgeTableRegion (const EdgeTableRegion& other) : Base (other), edgeTable (other.edgeTable) {}
EdgeTableRegion (const EdgeTableRegion& other) : Base(), edgeTable (other.edgeTable) {}
Ptr clone() const { return new EdgeTableRegion (*this); }
Ptr applyClipTo (const Ptr& target) const { return target->clipToEdgeTable (edgeTable); }
@@ -1774,7 +1774,7 @@ namespace ClipRegions
public:
RectangleListRegion (const Rectangle<int>& r) : clip (r) {}
RectangleListRegion (const RectangleList& r) : clip (r) {}
RectangleListRegion (const RectangleListRegion& other) : Base (other), clip (other.clip) {}
RectangleListRegion (const RectangleListRegion& other) : Base(), clip (other.clip) {}
Ptr clone() const { return new RectangleListRegion (*this); }
Ptr applyClipTo (const Ptr& target) const { return target->clipToRectangleList (clip); }


Loading…
Cancel
Save