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