You've already forked libopenshot
mirror of
https://github.com/OpenShot/libopenshot.git
synced 2026-03-02 08:53:52 -08:00
TrackedObject: DRY out with delegating ctors
This commit is contained in:
@@ -36,22 +36,15 @@
|
||||
namespace openshot
|
||||
{
|
||||
|
||||
// Blank constructor
|
||||
TrackedObjectBase::TrackedObjectBase() : visible(1.0), draw_box(1)
|
||||
{
|
||||
// Initializes the id as ""
|
||||
id = "";
|
||||
childClipId = "";
|
||||
}
|
||||
// Default constructor, delegating
|
||||
TrackedObjectBase::TrackedObjectBase() : TrackedObjectBase("") {}
|
||||
|
||||
// Default constructor
|
||||
TrackedObjectBase::TrackedObjectBase(std::string _id) : visible(1.0)
|
||||
{
|
||||
Id(_id);
|
||||
childClipId = "";
|
||||
}
|
||||
// Constructor
|
||||
TrackedObjectBase::TrackedObjectBase(std::string _id)
|
||||
: visible(1.0), draw_box(1), id(_id), childClipId("") {}
|
||||
|
||||
Json::Value TrackedObjectBase::add_property_choice_json(std::string name, int value, int selected_value) const
|
||||
Json::Value TrackedObjectBase::add_property_choice_json(
|
||||
std::string name, int value, int selected_value) const
|
||||
{
|
||||
// Create choice
|
||||
Json::Value new_choice = Json::Value(Json::objectValue);
|
||||
|
||||
Reference in New Issue
Block a user