From 7a394bc13b6e99e44c5bd25a4b21e739b2ea3508 Mon Sep 17 00:00:00 2001 From: john30 Date: Fri, 26 Dec 2014 19:45:31 +0100 Subject: [PATCH] allow empty field list, allow templates to override each other --- src/lib/ebus/data.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/ebus/data.cpp b/src/lib/ebus/data.cpp index 66208632..39a175d9 100644 --- a/src/lib/ebus/data.cpp +++ b/src/lib/ebus/data.cpp @@ -356,7 +356,7 @@ result_t DataField::create(vector::iterator& it, } while (it != end && result == RESULT_OK); - if (fields.empty() == true || result != RESULT_OK) { + if (result != RESULT_OK) { while (fields.empty() == false) { // cleanup already created fields delete fields.back(); fields.pop_back(); @@ -1246,7 +1246,7 @@ result_t DataFieldTemplates::addFromFile(vector::iterator& begin, const if (result != RESULT_OK) return result; - result = add(field); + result = add(field, true); if (result != RESULT_OK) delete field;