[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 {
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();
}

View File

@ -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() {

View File

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

View File

@ -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;

View File

@ -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) {

View File

@ -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() {

View File

@ -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 {

View File

@ -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) {

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -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
}
}

View File

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

View File

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

View File

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

View File

@ -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() {

View File

@ -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) {

View File

@ -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) {

View File

@ -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) {

View File

@ -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 {

View File

@ -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) {

View File

@ -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) {

View File

@ -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;

View File

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

View File

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

View File

@ -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 {

View File

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

View File

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

View File

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

View File

@ -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) {

View File

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

View File

@ -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) {