[DEV] update new ejson interface

This commit is contained in:
Edouard DUPIN 2015-01-12 23:20:23 +01:00
parent d2e9ab8b1a
commit 0f64bad930

View File

@ -45,13 +45,13 @@ void appl::GlyphPainting::reload() {
doc.generate(tmppppp); doc.generate(tmppppp);
APPL_DEBUG(tmppppp); APPL_DEBUG(tmppppp);
*/ */
ejson::Array* baseArray = doc.getArray("ednColor"); std::shared_ptr<ejson::Array> baseArray = doc.getArray("ednColor");
if (baseArray == nullptr) { if (baseArray == nullptr) {
APPL_ERROR("Can not get basic array : 'ednColor'"); APPL_ERROR("Can not get basic array : 'ednColor'");
return; return;
} }
for (size_t iii = 0; iii < baseArray->size(); ++iii) { for (size_t iii = 0; iii < baseArray->size(); ++iii) {
ejson::Object* tmpObj = baseArray->getObject(iii); std::shared_ptr<ejson::Object> tmpObj = baseArray->getObject(iii);
if (tmpObj == nullptr) { if (tmpObj == nullptr) {
APPL_DEBUG(" can not get object in 'ednColor' id=" << iii); APPL_DEBUG(" can not get object in 'ednColor' id=" << iii);
continue; continue;