瀏覽代碼

[cpp] Removed // Empty

badlogic 7 年之前
父節點
當前提交
4234b17ffa
共有 34 個文件被更改,包括 10 次插入92 次删除
  1. 3 1
      spine-cpp/spine-cpp/include/spine/Color.h
  2. 0 2
      spine-cpp/spine-cpp/include/spine/HashMap.h
  3. 0 1
      spine-cpp/spine-cpp/include/spine/Pool.h
  4. 3 9
      spine-cpp/spine-cpp/include/spine/Skeleton.h
  5. 0 1
      spine-cpp/spine-cpp/include/spine/Vector.h
  6. 0 5
      spine-cpp/spine-cpp/src/spine/AnimationState.cpp
  7. 0 2
      spine-cpp/spine-cpp/src/spine/AnimationStateData.cpp
  8. 0 1
      spine-cpp/spine-cpp/src/spine/AtlasAttachmentLoader.cpp
  9. 0 2
      spine-cpp/spine-cpp/src/spine/AttachmentLoader.cpp
  10. 0 1
      spine-cpp/spine-cpp/src/spine/BoundingBoxAttachment.cpp
  11. 0 1
      spine-cpp/spine-cpp/src/spine/ClippingAttachment.cpp
  12. 0 2
      spine-cpp/spine-cpp/src/spine/Constraint.cpp
  13. 0 1
      spine-cpp/spine-cpp/src/spine/Event.cpp
  14. 0 4
      spine-cpp/spine-cpp/src/spine/Extension.cpp
  15. 0 1
      spine-cpp/spine-cpp/src/spine/IkConstraintData.cpp
  16. 0 1
      spine-cpp/spine-cpp/src/spine/LinkedMesh.cpp
  17. 0 1
      spine-cpp/spine-cpp/src/spine/MeshAttachment.cpp
  18. 0 1
      spine-cpp/spine-cpp/src/spine/PathAttachment.cpp
  19. 0 1
      spine-cpp/spine-cpp/src/spine/PathConstraintPositionTimeline.cpp
  20. 0 1
      spine-cpp/spine-cpp/src/spine/PathConstraintSpacingTimeline.cpp
  21. 0 1
      spine-cpp/spine-cpp/src/spine/PointAttachment.cpp
  22. 0 2
      spine-cpp/spine-cpp/src/spine/RTTI.cpp
  23. 0 1
      spine-cpp/spine-cpp/src/spine/ScaleTimeline.cpp
  24. 0 1
      spine-cpp/spine-cpp/src/spine/ShearTimeline.cpp
  25. 4 35
      spine-cpp/spine-cpp/src/spine/Skeleton.cpp
  26. 0 1
      spine-cpp/spine-cpp/src/spine/SkeletonBounds.cpp
  27. 0 1
      spine-cpp/spine-cpp/src/spine/SkeletonData.cpp
  28. 0 1
      spine-cpp/spine-cpp/src/spine/Skin.cpp
  29. 0 1
      spine-cpp/spine-cpp/src/spine/SpineObject.cpp
  30. 0 2
      spine-cpp/spine-cpp/src/spine/TextureLoader.cpp
  31. 0 2
      spine-cpp/spine-cpp/src/spine/Timeline.cpp
  32. 0 1
      spine-cpp/spine-cpp/src/spine/TranslateTimeline.cpp
  33. 0 2
      spine-cpp/spine-cpp/src/spine/Updatable.cpp
  34. 0 2
      spine-cpp/spine-cpp/src/spine/VertexAttachment.cpp

+ 3 - 1
spine-cpp/spine-cpp/include/spine/Color.h

@@ -10,7 +10,9 @@
 namespace Spine {
 	class Color {
 	public:
-		Color() : _r(0), _g(0), _b(0), _a(0) {}
+		Color() : _r(0), _g(0), _b(0), _a(0) {
+		}
+
 		Color(float r, float g, float b, float a) : _r(r), _g(g), _b(b), _a(a) {
 			clamp();
 		}

+ 0 - 2
spine-cpp/spine-cpp/include/spine/HashMap.h

@@ -47,7 +47,6 @@ namespace Spine {
             
         public:
             explicit Iterator(Entry* entry = NULL) : _entry(entry) {
-                // Empty
             }
             
             Iterator& operator++() {
@@ -79,7 +78,6 @@ namespace Spine {
         _head(NULL),
         _hashFunction(),
         _size(0) {
-            // Empty
         }
         
         ~HashMap() {

+ 0 - 1
spine-cpp/spine-cpp/include/spine/Pool.h

@@ -41,7 +41,6 @@ namespace Spine {
     class Pool : public SpineObject {
     public:
         Pool() {
-            // Empty
         }
         
         ~Pool() {

+ 3 - 9
spine-cpp/spine-cpp/include/spine/Skeleton.h

@@ -35,6 +35,7 @@
 #include <spine/MathUtil.h>
 #include <spine/SpineObject.h>
 #include <spine/String.h>
+#include <spine/Color.h>
 
 #include <limits> // std::numeric_limits
 
@@ -154,14 +155,7 @@ namespace Spine {
         Vector<TransformConstraint*>& getTransformConstraints();
         
         Skin* getSkin();
-        float getR();
-        void setR(float inValue);
-        float getG();
-        void setG(float inValue);
-        float getB();
-        void setB(float inValue);
-        float getA();
-        void setA(float inValue);
+        Color& getColor();
         float getTime();
         void setTime(float inValue);
         float getX();
@@ -184,7 +178,7 @@ namespace Spine {
         Vector<Updatable*> _updateCache;
         Vector<Bone*> _updateCacheReset;
         Skin* _skin;
-        float _r, _g, _b, _a;
+        Color _color;
         float _time;
         bool _flipX, _flipY;
         float _x, _y;

+ 0 - 1
spine-cpp/spine-cpp/include/spine/Vector.h

@@ -44,7 +44,6 @@ namespace Spine {
     class Vector : public SpineObject {
     public:
         Vector() : _size(0), _capacity(0), _buffer(NULL) {
-            // Empty
         }
 
         Vector(const Vector& inVector) : _size(inVector._size), _capacity(inVector._capacity), _buffer(NULL) {

+ 0 - 5
spine-cpp/spine-cpp/src/spine/AnimationState.cpp

@@ -48,11 +48,9 @@
 
 namespace Spine {
     void dummyOnAnimationEventFunc(AnimationState* state, EventType type, TrackEntry* entry, Event* event = NULL) {
-        // Empty
     }
     
     TrackEntry::TrackEntry() : _animation(NULL), _next(NULL), _mixingFrom(NULL), _trackIndex(0), _loop(false), _eventThreshold(0), _attachmentThreshold(0), _drawOrderThreshold(0), _animationStart(0), _animationEnd(0), _animationLast(0), _nextAnimationLast(0), _delay(0), _trackTime(0), _trackLast(0), _nextTrackLast(0), _trackEnd(0), _timeScale(1.0f), _alpha(0), _mixTime(0), _mixDuration(0), _interruptAlpha(0), _totalAlpha(0), _onAnimationEventFunc(dummyOnAnimationEventFunc) {
-        // Empty
     }
     
     int TrackEntry::getTrackIndex() { return _trackIndex; }
@@ -210,7 +208,6 @@ namespace Spine {
     _type(eventType),
     _entry(trackEntry),
     _event(event) {
-        // Empty
     }
     
     EventQueue* EventQueue::newEventQueue(AnimationState& state, Pool<TrackEntry>& trackEntryPool) {
@@ -222,7 +219,6 @@ namespace Spine {
     }
     
     EventQueue::EventQueue(AnimationState& state, Pool<TrackEntry>& trackEntryPool) : _state(state), _trackEntryPool(trackEntryPool), _drainDisabled(false) {
-        // Empty
     }
     
     EventQueue::~EventQueue() {
@@ -310,7 +306,6 @@ namespace Spine {
     _onAnimationEventFunc(dummyOnAnimationEventFunc),
     _timeScale(1),
     _rendererObject(NULL){
-        // Empty
     }
     
     AnimationState::~AnimationState() {

+ 0 - 2
spine-cpp/spine-cpp/src/spine/AnimationStateData.cpp

@@ -35,7 +35,6 @@
 
 namespace Spine {
     AnimationStateData::AnimationStateData(SkeletonData* skeletonData) : _skeletonData(skeletonData), _defaultMix(0) {
-        // Empty
     }
     
     void AnimationStateData::setMix(const String& fromName, const String& toName, float duration) {
@@ -83,7 +82,6 @@ namespace Spine {
     }
     
     AnimationStateData::AnimationPair::AnimationPair(Animation* a1, Animation* a2) : _a1(a1), _a2(a2) {
-        // Empty
     }
     
     bool AnimationStateData::AnimationPair::operator==(const AnimationPair &other) const {

+ 0 - 1
spine-cpp/spine-cpp/src/spine/AtlasAttachmentLoader.cpp

@@ -44,7 +44,6 @@ namespace Spine {
     RTTI_IMPL(AtlasAttachmentLoader, AttachmentLoader);
     
     AtlasAttachmentLoader::AtlasAttachmentLoader(Atlas* atlas) : AttachmentLoader(), _atlas(atlas) {
-        // Empty
     }
     
     RegionAttachment* AtlasAttachmentLoader::newRegionAttachment(Skin& skin, const String& name, const String& path) {

+ 0 - 2
spine-cpp/spine-cpp/src/spine/AttachmentLoader.cpp

@@ -42,10 +42,8 @@ namespace Spine {
     RTTI_IMPL_NOPARENT(AttachmentLoader);
     
     AttachmentLoader::AttachmentLoader() {
-        // Empty
     }
     
     AttachmentLoader::~AttachmentLoader() {
-        // Empty
     }
 }

+ 0 - 1
spine-cpp/spine-cpp/src/spine/BoundingBoxAttachment.cpp

@@ -34,6 +34,5 @@ namespace Spine {
     RTTI_IMPL(BoundingBoxAttachment, VertexAttachment);
     
     BoundingBoxAttachment::BoundingBoxAttachment(const String& name) : VertexAttachment(name) {
-        // Empty
     }
 }

+ 0 - 1
spine-cpp/spine-cpp/src/spine/ClippingAttachment.cpp

@@ -36,7 +36,6 @@ namespace Spine {
     RTTI_IMPL(ClippingAttachment, VertexAttachment);
     
     ClippingAttachment::ClippingAttachment(const String& name) : VertexAttachment(name), _endSlot(NULL) {
-        // Empty
     }
     
     SlotData* ClippingAttachment::getEndSlot() {

+ 0 - 2
spine-cpp/spine-cpp/src/spine/Constraint.cpp

@@ -34,10 +34,8 @@ namespace Spine {
     RTTI_IMPL(Constraint, Updatable);
     
     Constraint::Constraint() {
-        // Empty
     }
     
     Constraint::~Constraint() {
-        // Empty
     }
 }

+ 0 - 1
spine-cpp/spine-cpp/src/spine/Event.cpp

@@ -39,7 +39,6 @@ namespace Spine {
     _intValue(0),
     _floatValue(0),
     _stringValue() {
-        // Empty
     }
     
     const EventData& Event::getData() {

+ 0 - 4
spine-cpp/spine-cpp/src/spine/Extension.cpp

@@ -51,15 +51,12 @@ namespace Spine {
     }
     
     SpineExtension::~SpineExtension() {
-        // Empty
     }
     
     SpineExtension::SpineExtension() {
-        // Empty
     }
     
     DefaultSpineExtension::~DefaultSpineExtension() {
-        // Empty
     }
     
     void* DefaultSpineExtension::_alloc(size_t size, const char* file, int line) {
@@ -112,6 +109,5 @@ namespace Spine {
     }
     
     DefaultSpineExtension::DefaultSpineExtension() : SpineExtension() {
-        // Empty
     }
 }

+ 0 - 1
spine-cpp/spine-cpp/src/spine/IkConstraintData.cpp

@@ -39,7 +39,6 @@ namespace Spine {
     _target(NULL),
     _bendDirection(1),
     _mix(1) {
-        // Empty
     }
     
     const String& IkConstraintData::getName() {

+ 0 - 1
spine-cpp/spine-cpp/src/spine/LinkedMesh.cpp

@@ -38,6 +38,5 @@ namespace Spine {
     _skin(skin),
     _slotIndex(slotIndex),
     _parent(parent) {
-        // Empty
     }
 }

+ 0 - 1
spine-cpp/spine-cpp/src/spine/MeshAttachment.cpp

@@ -54,7 +54,6 @@
     _hullLength(0),
     _inheritDeform(false),
     _regionRotate(false) {
-        // Empty
     }
     
     void MeshAttachment::updateUVs() {

+ 0 - 1
spine-cpp/spine-cpp/src/spine/PathAttachment.cpp

@@ -34,7 +34,6 @@ namespace Spine {
     RTTI_IMPL(PathAttachment, VertexAttachment);
     
     PathAttachment::PathAttachment(const String& name) : VertexAttachment(name), _closed(false), _constantSpeed(false) {
-        // Empty
     }
     
     Vector<float>& PathAttachment::getLengths() {

+ 0 - 1
spine-cpp/spine-cpp/src/spine/PathConstraintPositionTimeline.cpp

@@ -53,7 +53,6 @@ namespace Spine {
     }
 
     PathConstraintPositionTimeline::~PathConstraintPositionTimeline() {
-        // Empty
     }
     
     void PathConstraintPositionTimeline::apply(Skeleton& skeleton, float lastTime, float time, Vector<Event*>* pEvents, float alpha, MixPose pose, MixDirection direction) {

+ 0 - 1
spine-cpp/spine-cpp/src/spine/PathConstraintSpacingTimeline.cpp

@@ -44,7 +44,6 @@ namespace Spine {
     RTTI_IMPL(PathConstraintSpacingTimeline, PathConstraintPositionTimeline);
     
     PathConstraintSpacingTimeline::PathConstraintSpacingTimeline(int frameCount) : PathConstraintPositionTimeline(frameCount) {
-        // Empty
     }
     
     void PathConstraintSpacingTimeline::apply(Skeleton& skeleton, float lastTime, float time, Vector<Event*>* pEvents, float alpha, MixPose pose, MixDirection direction) {

+ 0 - 1
spine-cpp/spine-cpp/src/spine/PointAttachment.cpp

@@ -38,7 +38,6 @@ namespace Spine {
     RTTI_IMPL(PointAttachment, Attachment);
     
     PointAttachment::PointAttachment(const String& name) : Attachment(name), _x(0), _y(0), _rotation(0) {
-        // Empty
     }
     
     void PointAttachment::computeWorldPosition(Bone& bone, float& ox, float& oy) {

+ 0 - 2
spine-cpp/spine-cpp/src/spine/RTTI.cpp

@@ -33,11 +33,9 @@
 
 namespace Spine {
     RTTI::RTTI(const std::string& className) : _className(className), _pBaseRTTI(NULL) {
-        // Empty
     }
     
     RTTI::RTTI(const std::string& className, const RTTI& baseRTTI) : _className(className), _pBaseRTTI(&baseRTTI) {
-        // Empty
     }
     
     const std::string& RTTI::getClassName() const {

+ 0 - 1
spine-cpp/spine-cpp/src/spine/ScaleTimeline.cpp

@@ -44,7 +44,6 @@ namespace Spine {
     RTTI_IMPL(ScaleTimeline, TranslateTimeline);
     
     ScaleTimeline::ScaleTimeline(int frameCount) : TranslateTimeline(frameCount) {
-        // Empty
     }
     
     void ScaleTimeline::apply(Skeleton& skeleton, float lastTime, float time, Vector<Event*>* pEvents, float alpha, MixPose pose, MixDirection direction) {

+ 0 - 1
spine-cpp/spine-cpp/src/spine/ShearTimeline.cpp

@@ -44,7 +44,6 @@ namespace Spine {
     RTTI_IMPL(ShearTimeline, TranslateTimeline);
     
     ShearTimeline::ShearTimeline(int frameCount) : TranslateTimeline(frameCount) {
-        // Empty
     }
     
     void ShearTimeline::apply(Skeleton& skeleton, float lastTime, float time, Vector<Event*>* pEvents, float alpha, MixPose pose, MixDirection direction) {

+ 4 - 35
spine-cpp/spine-cpp/src/spine/Skeleton.cpp

@@ -56,10 +56,7 @@ namespace Spine {
     Skeleton::Skeleton(SkeletonData* skeletonData) :
     _data(skeletonData),
     _skin(NULL),
-    _r(1),
-    _g(1),
-    _b(1),
-    _a(1),
+    _color(1, 1, 1, 1),
     _time(0),
     _flipX(false),
     _flipY(false),
@@ -488,37 +485,9 @@ namespace Spine {
         return _skin;
     }
     
-    float Skeleton::getR() {
-        return _r;
-    }
-    
-    void Skeleton::setR(float inValue) {
-        _r = inValue;
-    }
-    
-    float Skeleton::getG() {
-        return _g;
-    }
-    
-    void Skeleton::setG(float inValue) {
-        _g = inValue;
-    }
-    
-    float Skeleton::getB() {
-        return _b;
-    }
-    
-    void Skeleton::setB(float inValue) {
-        _b = inValue;
-    }
-    
-    float Skeleton::getA() {
-        return _a;
-    }
-    
-    void Skeleton::setA(float inValue) {
-        _a = inValue;
-    }
+    Color& Skeleton::getColor() {
+		return _color;
+	}
     
     float Skeleton::getTime() {
         return _time;

+ 0 - 1
spine-cpp/spine-cpp/src/spine/SkeletonBounds.cpp

@@ -38,7 +38,6 @@
 
 namespace Spine {
     SkeletonBounds::SkeletonBounds() : _minX(0), _minY(0), _maxX(0), _maxY(0) {
-        // Empty
     }
     
     void SkeletonBounds::update(Skeleton& skeleton, bool updateAabb) {

+ 0 - 1
spine-cpp/spine-cpp/src/spine/SkeletonData.cpp

@@ -53,7 +53,6 @@ namespace Spine {
     _hash(),
     _fps(0),
     _imagesPath() {
-        // Empty
     }
     
     SkeletonData::~SkeletonData() {

+ 0 - 1
spine-cpp/spine-cpp/src/spine/Skin.cpp

@@ -41,7 +41,6 @@ namespace Spine {
     Skin::AttachmentKey::AttachmentKey(int slotIndex, const String& name) :
     _slotIndex(slotIndex),
     _name(name) {
-        // Empty
     }
     
     bool Skin::AttachmentKey::operator==(const AttachmentKey &other) const {

+ 0 - 1
spine-cpp/spine-cpp/src/spine/SpineObject.cpp

@@ -46,6 +46,5 @@ namespace Spine {
 	}
 
 	SpineObject::~SpineObject() {
-		// Empty
 	}
 }

+ 0 - 2
spine-cpp/spine-cpp/src/spine/TextureLoader.cpp

@@ -32,10 +32,8 @@
 
 namespace Spine {
     TextureLoader::TextureLoader() {
-        // Empty
     }
     
     TextureLoader::~TextureLoader() {
-        // Empty
     }
 }

+ 0 - 2
spine-cpp/spine-cpp/src/spine/Timeline.cpp

@@ -37,10 +37,8 @@ namespace Spine {
     RTTI_IMPL_NOPARENT(Timeline);
     
     Timeline::Timeline() {
-        // Empty
     }
     
     Timeline::~Timeline() {
-        // Empty
     }
 }

+ 0 - 1
spine-cpp/spine-cpp/src/spine/TranslateTimeline.cpp

@@ -56,7 +56,6 @@ namespace Spine {
     }
 
     TranslateTimeline::~TranslateTimeline() {
-        // Empty
     }
     
     void TranslateTimeline::apply(Skeleton& skeleton, float lastTime, float time, Vector<Event*>* pEvents, float alpha, MixPose pose, MixDirection direction) {

+ 0 - 2
spine-cpp/spine-cpp/src/spine/Updatable.cpp

@@ -34,10 +34,8 @@ namespace Spine {
     RTTI_IMPL_NOPARENT(Updatable);
     
     Updatable::Updatable() {
-        // Empty
     }
     
     Updatable::~Updatable() {
-        // Empty
     }
 }

+ 0 - 2
spine-cpp/spine-cpp/src/spine/VertexAttachment.cpp

@@ -39,11 +39,9 @@ namespace Spine {
     RTTI_IMPL(VertexAttachment, Attachment);
     
     VertexAttachment::VertexAttachment(const String& name) : Attachment(name), _worldVerticesLength(0), _id(getNextID()) {
-        // Empty
     }
 
     VertexAttachment::~VertexAttachment() {
-        // Empty
     }
     
     void VertexAttachment::computeWorldVertices(Slot& slot, Vector<float>& worldVertices) {