[DEV] update nullptr in null (specific etk)
This commit is contained in:
parent
27a67f7745
commit
316f42aabe
@ -64,5 +64,5 @@ ememory::SharedPtr<dollar::Engine> dollar::createEngine(const etk::String& _meth
|
|||||||
if (_method == "$P+") {
|
if (_method == "$P+") {
|
||||||
return ememory::makeShared<dollar::EnginePPlus>();
|
return ememory::makeShared<dollar::EnginePPlus>();
|
||||||
}
|
}
|
||||||
return nullptr;
|
return null;
|
||||||
}
|
}
|
||||||
|
@ -70,7 +70,7 @@ void dollar::EngineN::setNumberPointInGesture(size_t _value) {
|
|||||||
m_numPointsInGesture = _value;
|
m_numPointsInGesture = _value;
|
||||||
DOLLAR_ASSERT(m_numPointsInGesture>16, "NB element in a path must be > 16 ...");
|
DOLLAR_ASSERT(m_numPointsInGesture>16, "NB element in a path must be > 16 ...");
|
||||||
for (auto &it: m_gestures) {
|
for (auto &it: m_gestures) {
|
||||||
if (it == nullptr) {
|
if (it == null) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
it->configure(m_numPointsInGesture/RATIO_START_VECTOR, m_numPointsInGesture, m_paramterIgnoreRotation);
|
it->configure(m_numPointsInGesture/RATIO_START_VECTOR, m_numPointsInGesture, m_paramterIgnoreRotation);
|
||||||
@ -150,7 +150,7 @@ bool dollar::EngineN::loadGesture(const etk::String& _filename) {
|
|||||||
|
|
||||||
void dollar::EngineN::addGesture(ememory::SharedPtr<dollar::Gesture> _gesture) {
|
void dollar::EngineN::addGesture(ememory::SharedPtr<dollar::Gesture> _gesture) {
|
||||||
ememory::SharedPtr<dollar::GestureN> gest = ememory::dynamicPointerCast<dollar::GestureN>(_gesture);
|
ememory::SharedPtr<dollar::GestureN> gest = ememory::dynamicPointerCast<dollar::GestureN>(_gesture);
|
||||||
if (gest != nullptr) {
|
if (gest != null) {
|
||||||
gest->configure(m_numPointsInGesture/RATIO_START_VECTOR, m_numPointsInGesture, m_paramterIgnoreRotation);
|
gest->configure(m_numPointsInGesture/RATIO_START_VECTOR, m_numPointsInGesture, m_paramterIgnoreRotation);
|
||||||
m_gestures.pushBack(gest);
|
m_gestures.pushBack(gest);
|
||||||
}
|
}
|
||||||
|
@ -29,7 +29,7 @@ void dollar::EngineP::setNumberPointInGesture(size_t _value) {
|
|||||||
m_numPointsInGesture = _value;
|
m_numPointsInGesture = _value;
|
||||||
DOLLAR_ASSERT(m_numPointsInGesture>16, "NB element in a path must be > 16 ...");
|
DOLLAR_ASSERT(m_numPointsInGesture>16, "NB element in a path must be > 16 ...");
|
||||||
for (auto &it: m_gestures) {
|
for (auto &it: m_gestures) {
|
||||||
if (it == nullptr) {
|
if (it == null) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
it->configure(m_numPointsInGesture);
|
it->configure(m_numPointsInGesture);
|
||||||
@ -46,7 +46,7 @@ void dollar::EngineP::setScaleKeepRatio(bool _value) {
|
|||||||
}
|
}
|
||||||
m_scaleKeepRatio = _value;
|
m_scaleKeepRatio = _value;
|
||||||
for (auto &it: m_gestures) {
|
for (auto &it: m_gestures) {
|
||||||
if (it == nullptr) {
|
if (it == null) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
it->configure(m_numPointsInGesture);
|
it->configure(m_numPointsInGesture);
|
||||||
@ -113,7 +113,7 @@ bool dollar::EngineP::loadGesture(const etk::String& _filename) {
|
|||||||
|
|
||||||
void dollar::EngineP::addGesture(ememory::SharedPtr<dollar::Gesture> _gesture) {
|
void dollar::EngineP::addGesture(ememory::SharedPtr<dollar::Gesture> _gesture) {
|
||||||
ememory::SharedPtr<dollar::GestureP> gest = ememory::dynamicPointerCast<dollar::GestureP>(_gesture);
|
ememory::SharedPtr<dollar::GestureP> gest = ememory::dynamicPointerCast<dollar::GestureP>(_gesture);
|
||||||
if (gest != nullptr) {
|
if (gest != null) {
|
||||||
gest->configure(m_numPointsInGesture);
|
gest->configure(m_numPointsInGesture);
|
||||||
m_gestures.pushBack(gest);
|
m_gestures.pushBack(gest);
|
||||||
}
|
}
|
||||||
|
@ -31,7 +31,7 @@ void dollar::EnginePPlus::setPPlusDistance(float _value) {
|
|||||||
}
|
}
|
||||||
m_PPlusDistance = _value;
|
m_PPlusDistance = _value;
|
||||||
for (auto &it: m_gestures) {
|
for (auto &it: m_gestures) {
|
||||||
if (it == nullptr) {
|
if (it == null) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
it->configure(m_PPlusDistance, m_scaleKeepRatio);
|
it->configure(m_PPlusDistance, m_scaleKeepRatio);
|
||||||
@ -58,7 +58,7 @@ void dollar::EnginePPlus::setScaleKeepRatio(bool _value) {
|
|||||||
}
|
}
|
||||||
m_scaleKeepRatio = _value;
|
m_scaleKeepRatio = _value;
|
||||||
for (auto &it: m_gestures) {
|
for (auto &it: m_gestures) {
|
||||||
if (it == nullptr) {
|
if (it == null) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
it->configure(m_PPlusDistance, m_scaleKeepRatio);
|
it->configure(m_PPlusDistance, m_scaleKeepRatio);
|
||||||
@ -245,7 +245,7 @@ bool dollar::EnginePPlus::loadGesture(const etk::String& _filename) {
|
|||||||
|
|
||||||
void dollar::EnginePPlus::addGesture(ememory::SharedPtr<dollar::Gesture> _gesture) {
|
void dollar::EnginePPlus::addGesture(ememory::SharedPtr<dollar::Gesture> _gesture) {
|
||||||
ememory::SharedPtr<dollar::GesturePPlus> gest = ememory::dynamicPointerCast<dollar::GesturePPlus>(_gesture);
|
ememory::SharedPtr<dollar::GesturePPlus> gest = ememory::dynamicPointerCast<dollar::GesturePPlus>(_gesture);
|
||||||
if (gest != nullptr) {
|
if (gest != null) {
|
||||||
gest->configure(m_PPlusDistance, m_scaleKeepRatio);
|
gest->configure(m_PPlusDistance, m_scaleKeepRatio);
|
||||||
m_gestures.pushBack(gest);
|
m_gestures.pushBack(gest);
|
||||||
}
|
}
|
||||||
|
@ -38,10 +38,10 @@ static etk::Vector<etk::Vector<vec2>> loadPointsJson(const ejson::Document& _doc
|
|||||||
etk::Vector<etk::Vector<vec2>> dollar::loadPoints(const etk::String& _fileName, etk::String* _label, etk::String* _type) {
|
etk::Vector<etk::Vector<vec2>> dollar::loadPoints(const etk::String& _fileName, etk::String* _label, etk::String* _type) {
|
||||||
ejson::Document doc;
|
ejson::Document doc;
|
||||||
doc.load(_fileName);
|
doc.load(_fileName);
|
||||||
if (_label != nullptr) {
|
if (_label != null) {
|
||||||
*_label = doc["value"].toString().get();
|
*_label = doc["value"].toString().get();
|
||||||
}
|
}
|
||||||
if (_type != nullptr) {
|
if (_type != null) {
|
||||||
*_type = doc["type"].toString().get();
|
*_type = doc["type"].toString().get();
|
||||||
}
|
}
|
||||||
// extract lines:
|
// extract lines:
|
||||||
|
@ -46,5 +46,5 @@ namespace dollar {
|
|||||||
* @brief Load all point from a specific file
|
* @brief Load all point from a specific file
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
etk::Vector<etk::Vector<vec2>> loadPoints(const etk::String& _fileName, etk::String* _label=nullptr, etk::String* _type=nullptr);
|
etk::Vector<etk::Vector<vec2>> loadPoints(const etk::String& _fileName, etk::String* _label=null, etk::String* _type=null);
|
||||||
}
|
}
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
#include <etk/tool.hpp>
|
#include <etk/tool.hpp>
|
||||||
|
|
||||||
appl::Windows::Windows() :
|
appl::Windows::Windows() :
|
||||||
m_composer(nullptr),
|
m_composer(null),
|
||||||
m_currentId(0),
|
m_currentId(0),
|
||||||
m_currentTypeId(0),
|
m_currentTypeId(0),
|
||||||
m_userName("Edouard DUPIN") {
|
m_userName("Edouard DUPIN") {
|
||||||
@ -160,7 +160,7 @@ void appl::Windows::init() {
|
|||||||
composition += " </sizer>\n";
|
composition += " </sizer>\n";
|
||||||
composition += "</sizer>\n";
|
composition += "</sizer>\n";
|
||||||
m_composer = ewol::widget::Composer::create();
|
m_composer = ewol::widget::Composer::create();
|
||||||
if (m_composer == nullptr) {
|
if (m_composer == null) {
|
||||||
APPL_CRITICAL(" An error occured ... in the windows creatrion ...");
|
APPL_CRITICAL(" An error occured ... in the windows creatrion ...");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -178,7 +178,7 @@ void appl::Windows::init() {
|
|||||||
propertySetOnWidgetNamed("current-type", "value", m_listType[m_currentTypeId]);
|
propertySetOnWidgetNamed("current-type", "value", m_listType[m_currentTypeId]);
|
||||||
|
|
||||||
auto tmpDisp = ememory::dynamicPointerCast<appl::widget::TextAreaRecognition>(getSubObjectNamed("recorder"));
|
auto tmpDisp = ememory::dynamicPointerCast<appl::widget::TextAreaRecognition>(getSubObjectNamed("recorder"));
|
||||||
if (tmpDisp != nullptr) {
|
if (tmpDisp != null) {
|
||||||
tmpDisp->setCompare(m_listType[m_currentTypeId] + " " + m_listValue[m_currentId]);
|
tmpDisp->setCompare(m_listType[m_currentTypeId] + " " + m_listValue[m_currentId]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -189,14 +189,14 @@ void appl::Windows::onCallbackChangeNameUser(const etk::String& _value) {
|
|||||||
|
|
||||||
void appl::Windows::onCallbackClear() {
|
void appl::Windows::onCallbackClear() {
|
||||||
auto tmpDisp = ememory::dynamicPointerCast<appl::widget::TextAreaRecognition>(getSubObjectNamed("recorder"));
|
auto tmpDisp = ememory::dynamicPointerCast<appl::widget::TextAreaRecognition>(getSubObjectNamed("recorder"));
|
||||||
if (tmpDisp != nullptr) {
|
if (tmpDisp != null) {
|
||||||
tmpDisp->clear();
|
tmpDisp->clear();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void appl::Windows::onCallbackStore() {
|
void appl::Windows::onCallbackStore() {
|
||||||
auto tmpDisp = ememory::dynamicPointerCast<appl::widget::TextAreaRecognition>(getSubObjectNamed("recorder"));
|
auto tmpDisp = ememory::dynamicPointerCast<appl::widget::TextAreaRecognition>(getSubObjectNamed("recorder"));
|
||||||
if (tmpDisp != nullptr) {
|
if (tmpDisp != null) {
|
||||||
tmpDisp->store(m_userName, m_listValue[m_currentId], m_listType[m_currentTypeId]);
|
tmpDisp->store(m_userName, m_listValue[m_currentId], m_listType[m_currentTypeId]);
|
||||||
tmpDisp->clear();
|
tmpDisp->clear();
|
||||||
}
|
}
|
||||||
@ -204,7 +204,7 @@ void appl::Windows::onCallbackStore() {
|
|||||||
|
|
||||||
void appl::Windows::onCallbackUndo() {
|
void appl::Windows::onCallbackUndo() {
|
||||||
auto tmpDisp = ememory::dynamicPointerCast<appl::widget::TextAreaRecognition>(getSubObjectNamed("recorder"));
|
auto tmpDisp = ememory::dynamicPointerCast<appl::widget::TextAreaRecognition>(getSubObjectNamed("recorder"));
|
||||||
if (tmpDisp != nullptr) {
|
if (tmpDisp != null) {
|
||||||
tmpDisp->undo();
|
tmpDisp->undo();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -222,7 +222,7 @@ void appl::Windows::onCallbackPrevious() {
|
|||||||
propertySetOnWidgetNamed("current-lettre", "value", m_listValue[m_currentId]);
|
propertySetOnWidgetNamed("current-lettre", "value", m_listValue[m_currentId]);
|
||||||
}
|
}
|
||||||
auto tmpDisp = ememory::dynamicPointerCast<appl::widget::TextAreaRecognition>(getSubObjectNamed("recorder"));
|
auto tmpDisp = ememory::dynamicPointerCast<appl::widget::TextAreaRecognition>(getSubObjectNamed("recorder"));
|
||||||
if (tmpDisp != nullptr) {
|
if (tmpDisp != null) {
|
||||||
tmpDisp->setCompare(m_listType[m_currentTypeId] + " " + m_listValue[m_currentId]);
|
tmpDisp->setCompare(m_listType[m_currentTypeId] + " " + m_listValue[m_currentId]);
|
||||||
}
|
}
|
||||||
onCallbackClear();
|
onCallbackClear();
|
||||||
@ -241,7 +241,7 @@ void appl::Windows::onCallbackNext() {
|
|||||||
propertySetOnWidgetNamed("current-lettre", "value", m_listValue[m_currentId]);
|
propertySetOnWidgetNamed("current-lettre", "value", m_listValue[m_currentId]);
|
||||||
}
|
}
|
||||||
auto tmpDisp = ememory::dynamicPointerCast<appl::widget::TextAreaRecognition>(getSubObjectNamed("recorder"));
|
auto tmpDisp = ememory::dynamicPointerCast<appl::widget::TextAreaRecognition>(getSubObjectNamed("recorder"));
|
||||||
if (tmpDisp != nullptr) {
|
if (tmpDisp != null) {
|
||||||
tmpDisp->setCompare(m_listType[m_currentTypeId] + " " + m_listValue[m_currentId]);
|
tmpDisp->setCompare(m_listType[m_currentTypeId] + " " + m_listValue[m_currentId]);
|
||||||
}
|
}
|
||||||
onCallbackClear();
|
onCallbackClear();
|
||||||
@ -254,7 +254,7 @@ void appl::Windows::onCallbackPreviousType() {
|
|||||||
m_currentTypeId--;
|
m_currentTypeId--;
|
||||||
propertySetOnWidgetNamed("current-type", "value", m_listType[m_currentTypeId]);
|
propertySetOnWidgetNamed("current-type", "value", m_listType[m_currentTypeId]);
|
||||||
auto tmpDisp = ememory::dynamicPointerCast<appl::widget::TextAreaRecognition>(getSubObjectNamed("recorder"));
|
auto tmpDisp = ememory::dynamicPointerCast<appl::widget::TextAreaRecognition>(getSubObjectNamed("recorder"));
|
||||||
if (tmpDisp != nullptr) {
|
if (tmpDisp != null) {
|
||||||
tmpDisp->setCompare(m_listType[m_currentTypeId] + " " + m_listValue[m_currentId]);
|
tmpDisp->setCompare(m_listType[m_currentTypeId] + " " + m_listValue[m_currentId]);
|
||||||
}
|
}
|
||||||
onCallbackClear();
|
onCallbackClear();
|
||||||
@ -267,7 +267,7 @@ void appl::Windows::onCallbackNextType() {
|
|||||||
}
|
}
|
||||||
propertySetOnWidgetNamed("current-type", "value", m_listType[m_currentTypeId]);
|
propertySetOnWidgetNamed("current-type", "value", m_listType[m_currentTypeId]);
|
||||||
auto tmpDisp = ememory::dynamicPointerCast<appl::widget::TextAreaRecognition>(getSubObjectNamed("recorder"));
|
auto tmpDisp = ememory::dynamicPointerCast<appl::widget::TextAreaRecognition>(getSubObjectNamed("recorder"));
|
||||||
if (tmpDisp != nullptr) {
|
if (tmpDisp != null) {
|
||||||
tmpDisp->setCompare(m_listType[m_currentTypeId] + " " + m_listValue[m_currentId]);
|
tmpDisp->setCompare(m_listType[m_currentTypeId] + " " + m_listValue[m_currentId]);
|
||||||
}
|
}
|
||||||
onCallbackClear();
|
onCallbackClear();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user