[cpp] Removed // Empty

This commit is contained in:
badlogic 2018-02-21 15:29:57 +01:00
parent 5af3d93403
commit 4234b17ffa
34 changed files with 10 additions and 92 deletions

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -48,11 +48,9 @@
namespace Spine { namespace Spine {
void dummyOnAnimationEventFunc(AnimationState* state, EventType type, TrackEntry* entry, Event* event = NULL) { 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) { 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; } int TrackEntry::getTrackIndex() { return _trackIndex; }
@ -210,7 +208,6 @@ namespace Spine {
_type(eventType), _type(eventType),
_entry(trackEntry), _entry(trackEntry),
_event(event) { _event(event) {
// Empty
} }
EventQueue* EventQueue::newEventQueue(AnimationState& state, Pool<TrackEntry>& trackEntryPool) { 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) { EventQueue::EventQueue(AnimationState& state, Pool<TrackEntry>& trackEntryPool) : _state(state), _trackEntryPool(trackEntryPool), _drainDisabled(false) {
// Empty
} }
EventQueue::~EventQueue() { EventQueue::~EventQueue() {
@ -310,7 +306,6 @@ namespace Spine {
_onAnimationEventFunc(dummyOnAnimationEventFunc), _onAnimationEventFunc(dummyOnAnimationEventFunc),
_timeScale(1), _timeScale(1),
_rendererObject(NULL){ _rendererObject(NULL){
// Empty
} }
AnimationState::~AnimationState() { AnimationState::~AnimationState() {

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -56,10 +56,7 @@ namespace Spine {
Skeleton::Skeleton(SkeletonData* skeletonData) : Skeleton::Skeleton(SkeletonData* skeletonData) :
_data(skeletonData), _data(skeletonData),
_skin(NULL), _skin(NULL),
_r(1), _color(1, 1, 1, 1),
_g(1),
_b(1),
_a(1),
_time(0), _time(0),
_flipX(false), _flipX(false),
_flipY(false), _flipY(false),
@ -488,37 +485,9 @@ namespace Spine {
return _skin; return _skin;
} }
float Skeleton::getR() { Color& Skeleton::getColor() {
return _r; return _color;
} }
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;
}
float Skeleton::getTime() { float Skeleton::getTime() {
return _time; return _time;

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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