variable initialization

This commit is contained in:
john30
2014-12-27 12:41:18 +01:00
parent f659788e39
commit 6ac101f79b
+1 -1
View File
@@ -378,7 +378,6 @@ result_t MessageMap::add(Message* message)
result_t MessageMap::addFromFile(vector<string>::iterator& begin, const vector<string>::iterator end, DataFieldTemplates* arg, vector< vector<string> >* defaults, const string& filename, unsigned int lineNo) result_t MessageMap::addFromFile(vector<string>::iterator& begin, const vector<string>::iterator end, DataFieldTemplates* arg, vector< vector<string> >* defaults, const string& filename, unsigned int lineNo)
{ {
Message* message = NULL;
vector<string>::iterator restart = begin; vector<string>::iterator restart = begin;
string types = *restart; string types = *restart;
if (types.length() == 0) if (types.length() == 0)
@@ -390,6 +389,7 @@ result_t MessageMap::addFromFile(vector<string>::iterator& begin, const vector<s
while (getline(stream, type, VALUE_SEPARATOR) != 0) { while (getline(stream, type, VALUE_SEPARATOR) != 0) {
*restart = type; *restart = type;
begin = restart; begin = restart;
Message* message = NULL;
result = Message::create(begin, end, defaults, arg, message); result = Message::create(begin, end, defaults, arg, message);
if (result != RESULT_OK) if (result != RESULT_OK)
return result; return result;