Changeset View
Changeset View
Standalone View
Standalone View
source/ps/Shapes.cpp
Show All 18 Lines | |||||
#include "Shapes.h" | #include "Shapes.h" | ||||
CRect::CRect() : | CRect::CRect() : | ||||
left(0.f), top(0.f), right(0.f), bottom(0.f) | left(0.f), top(0.f), right(0.f), bottom(0.f) | ||||
{ | { | ||||
} | } | ||||
CRect::CRect(const CRect& rect) : | |||||
left(rect.left), top(rect.top), right(rect.right), bottom(rect.bottom) | |||||
vladislavbelov: We should use the same style to initialise members (`:`). | |||||
Done Inline Actionscoding conventions say keep consistent within the file first, then with the parent folder etc. elexis: coding conventions say keep consistent within the file first, then with the parent folder etc. | |||||
{ | |||||
} | |||||
CRect::CRect(const CPos &pos) : | CRect::CRect(const CPos &pos) : | ||||
left(pos.x), top(pos.y), right(pos.x), bottom(pos.y) | left(pos.x), top(pos.y), right(pos.x), bottom(pos.y) | ||||
{ | { | ||||
} | } | ||||
CRect::CRect(const CSize& size) : | CRect::CRect(const CSize& size) : | ||||
left(0.f), top(0.f), right(size.cx), bottom(size.cy) | left(0.f), top(0.f), right(size.cx), bottom(size.cy) | ||||
{ | { | ||||
▲ Show 20 Lines • Show All 178 Lines • ▼ Show 20 Lines | |||||
} | } | ||||
/*************************************************************************/ | /*************************************************************************/ | ||||
CPos::CPos() : x(0.f), y(0.f) | CPos::CPos() : x(0.f), y(0.f) | ||||
{ | { | ||||
} | } | ||||
CPos::CPos(const CPos& pos) : x(pos.x), y(pos.y) | |||||
{ | |||||
} | |||||
CPos::CPos(const CSize& s) : x(s.cx), y(s.cy) | CPos::CPos(const CSize& s) : x(s.cx), y(s.cy) | ||||
{ | { | ||||
} | } | ||||
CPos::CPos(const float px, const float py) : x(px), y(py) | CPos::CPos(const float px, const float py) : x(px), y(py) | ||||
{ | { | ||||
} | } | ||||
▲ Show 20 Lines • Show All 69 Lines • ▼ Show 20 Lines | |||||
} | } | ||||
/*************************************************************************/ | /*************************************************************************/ | ||||
CSize::CSize() : cx(0.f), cy(0.f) | CSize::CSize() : cx(0.f), cy(0.f) | ||||
{ | { | ||||
} | } | ||||
CSize::CSize(const CSize& size) : cx(size.cx), cy(size.cy) | |||||
{ | |||||
} | |||||
CSize::CSize(const CRect &rect) : cx(rect.GetWidth()), cy(rect.GetHeight()) | CSize::CSize(const CRect &rect) : cx(rect.GetWidth()), cy(rect.GetHeight()) | ||||
{ | { | ||||
} | } | ||||
CSize::CSize(const CPos &pos) : cx(pos.x), cy(pos.y) | CSize::CSize(const CPos &pos) : cx(pos.x), cy(pos.y) | ||||
{ | { | ||||
} | } | ||||
▲ Show 20 Lines • Show All 74 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator
We should use the same style to initialise members (:).