summaryrefslogtreecommitdiff
path: root/SDL_Core
diff options
context:
space:
mode:
authorJustin Dickow <jjdickow@gmail.com>2014-03-19 09:05:57 -0400
committerJustin Dickow <jjdickow@gmail.com>2014-03-19 09:05:57 -0400
commit687923e26ee491303a18b7abfefc09f08686aa5d (patch)
treebeb7c9c6c951ea6e81275dc004f05dc3852539cd /SDL_Core
parent74f944d745354964de6b77804d3f50765ccf03e3 (diff)
downloadsmartdevicelink-687923e26ee491303a18b7abfefc09f08686aa5d.tar.gz
compare app_id as unsigned int
Signed-off-by: Justin Dickow <jjdickow@gmail.com>
Diffstat (limited to 'SDL_Core')
-rw-r--r--SDL_Core/src/components/application_manager/src/resume_ctrl.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/SDL_Core/src/components/application_manager/src/resume_ctrl.cpp b/SDL_Core/src/components/application_manager/src/resume_ctrl.cpp
index 74cb2459d..587c312c6 100644
--- a/SDL_Core/src/components/application_manager/src/resume_ctrl.cpp
+++ b/SDL_Core/src/components/application_manager/src/resume_ctrl.cpp
@@ -40,10 +40,10 @@ void ResumeCtrl::SaveApplication(ApplicationConstSharedPtr application) {
DCHECK(application.get());
Json::Value* json_app = NULL;
- const uint32_t app_id = application->mobile_app_id()->asInt();
+ const uint32_t app_id = application->mobile_app_id()->asUInt();
for (std::vector<Json::Value>::iterator it = saved_applications_.begin();
it != saved_applications_.end(); ++it) {
- if ((*it)[strings::app_id].asInt() == app_id) {
+ if ((*it)[strings::app_id].asUInt() == app_id) {
json_app = &(*it);
LOG4CXX_INFO(logger_, "ResumeCtrl Application with this id"
"is already exist ( update info ) " << app_id);
@@ -117,8 +117,8 @@ bool ResumeCtrl::RestoreApplicationHMILevel(ApplicationSharedPtr application) {
for (std::vector<Json::Value>::iterator it = saved_applications_.begin();
it != saved_applications_.end(); ++it) {
- if ((*it)[strings::app_id].asInt() ==
- application->mobile_app_id()->asInt()) {
+ if ((*it)[strings::app_id].asUInt() ==
+ application->mobile_app_id()->asUInt()) {
mobile_apis::HMILevel::eType saved_hmi_level;
mobile_apis::HMILevel::eType restored_hmi_level;
@@ -136,7 +136,7 @@ bool ResumeCtrl::RestoreApplicationHMILevel(ApplicationSharedPtr application) {
}
MessageHelper::SendHMIStatusNotification(*(application.get()));
LOG4CXX_INFO(logger_, "Restore Application "
- << (*it)[strings::app_id].asInt()
+ << (*it)[strings::app_id].asUInt()
<< " to HMILevel " << restored_hmi_level);
return true;
}
@@ -151,8 +151,8 @@ bool ResumeCtrl::RestoreApplicationData(ApplicationSharedPtr application) {
std::vector<Json::Value>::iterator it = saved_applications_.begin();
for (; it != saved_applications_.end(); ++it) {
- if ((*it)[strings::app_id].asInt() ==
- application->mobile_app_id()->asInt()) {
+ if ((*it)[strings::app_id].asUInt() ==
+ application->mobile_app_id()->asUInt()) {
break;
}
}
@@ -264,7 +264,7 @@ bool ResumeCtrl::RemoveApplicationFromSaved(ApplicationConstSharedPtr applicatio
for (std::vector<Json::Value>::iterator it = saved_applications_.begin();
it != saved_applications_.end(); ) {
- if ((*it)[strings::app_id].asInt() == application->mobile_app_id()->asInt()) {
+ if ((*it)[strings::app_id].asUInt() == application->mobile_app_id()->asUInt()) {
saved_applications_.erase(it);
return true;
} else {
@@ -310,8 +310,8 @@ bool ResumeCtrl::StartResumption(ApplicationSharedPtr application,
std::vector<Json::Value>::iterator it = saved_applications_.begin();
for (; it != saved_applications_.end(); ++it) {
- if ((*it)[strings::app_id].asInt() ==
- application->mobile_app_id()->asInt()) {
+ if ((*it)[strings::app_id].asUInt() ==
+ application->mobile_app_id()->asUInt()) {
uint32_t saved_hash = (*it)[strings::hash_id].asUInt();
uint32_t time_stamp= (*it)[strings::time_stamp].asUInt();
@@ -332,7 +332,7 @@ bool ResumeCtrl::StartResumption(ApplicationSharedPtr application,
bool ResumeCtrl::CheckApplicationHash(uint32_t app_id, uint32_t hash) {
std::vector<Json::Value>::iterator it = saved_applications_.begin();
for (; it != saved_applications_.end(); ++it) {
- if ((*it)[strings::app_id].asInt() == app_id) {
+ if ((*it)[strings::app_id].asUInt() == app_id) {
uint32_t saved_hash = (*it)[strings::hash_id].asUInt();
if (hash == saved_hash) {
return true;