summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWonYoung Choi <wy80.choi@samsung.com>2016-02-02 19:42:02 +0900
committerWonYoung Choi <wy80.choi@samsung.com>2016-02-02 19:42:02 +0900
commitb641406c02baaf88bd473609833f6c159541b949 (patch)
treea93e3f76d7fdf09ca04765bd8f31df80b68bf777
parent84564e775ab96692ac3c497d9c600090c63924eb (diff)
downloadjsnative-accepted/tizen_ivi.tar.gz
jsnative-accepted/tizen_ivi.tar.bz2
jsnative-accepted/tizen_ivi.zip
Change-Id: I5cd2e5c1b0480272fdc8979a447e67e861b215d1
-rw-r--r--modules/tizen-device/device_extension.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/modules/tizen-device/device_extension.cc b/modules/tizen-device/device_extension.cc
index 3afef5f..de04c93 100644
--- a/modules/tizen-device/device_extension.cc
+++ b/modules/tizen-device/device_extension.cc
@@ -126,25 +126,25 @@ void DeviceChangedCallback(device_callback_e type, void* value, void* data) {
switch (type) {
case DEVICE_CALLBACK_BATTERY_CAPACITY:
event["event"] = "battery.capacity";
- event["value"] = reinterpret_cast<int>(value);
+ event["value"] = *static_cast<int*>(value);
break;
case DEVICE_CALLBACK_BATTERY_LEVEL:
event["event"] = "battery.level";
event["value"] = GetBatteryLevelString(
- static_cast<device_battery_level_e>(reinterpret_cast<int>(value)));
+ static_cast<device_battery_level_e>(*static_cast<int*>(value)));
break;
case DEVICE_CALLBACK_BATTERY_CHARGING:
event["event"] = "battery.charging";
- event["value"] = (reinterpret_cast<int>(value) != 0);
+ event["value"] = (*static_cast<int*>(value) != 0);
break;
case DEVICE_CALLBACK_DISPLAY_STATE:
event["event"] = "display.state";
event["value"] = GetDisplayStateString(
- static_cast<display_state_e>(reinterpret_cast<int>(value)));
+ static_cast<display_state_e>(*static_cast<int*>(value)));
break;
case DEVICE_CALLBACK_FLASH_BRIGHTNESS:
event["event"] = "flash.brightness";
- event["value"] = reinterpret_cast<int>(value);
+ event["value"] = *static_cast<int*>(value);
break;
default:
event["event"] = "unknown";