The parameterized constructor of JobInfo initializes all member variables 64/134064/1
authorMu-Woong Lee <muwoong.lee@samsung.com>
Wed, 14 Jun 2017 10:26:52 +0000 (19:26 +0900)
committerMu-Woong Lee <muwoong.lee@samsung.com>
Wed, 14 Jun 2017 10:26:52 +0000 (19:26 +0900)
Change-Id: Ieb12fd46fdd9d47607dbd8c2dc8f3bb9553bf7d6
Signed-off-by: Mu-Woong Lee <muwoong.lee@samsung.com>
src/shared/JobInfo.cpp

index bca38bfe828f5cda1659564073a9209dc4dd8b5b..1fa92800a9e6e0b51ecb7501ce71ff4aa0ef331a 100644 (file)
@@ -67,11 +67,8 @@ JobInfo::JobInfo(Json::Value& jsonRoot, const std::string& serializedStr) :
                __requirements.push_back(new JobRequirement(name, reqNode[name]));
        }
 
-       if (jsonRoot.isMember(KEY_JOB_ID))
-               __jobId = jsonRoot[KEY_JOB_ID].asInt();
-
-       if (jsonRoot.isMember(KEY_STARTED))
-               __started = jsonRoot[KEY_STARTED].asBool();
+       __jobId = jsonRoot[KEY_JOB_ID].asInt();
+       __started = jsonRoot[KEY_STARTED].asBool();
 
        __disjunction = jsonRoot[KEY_DISJUNCTION].asBool();
 }