size_t i = 0;
for (auto iter = value_array.begin(); iter != value_array.end(); ++iter, ++i) {
- arr[i] = static_cast<unsigned char>((*iter).get<double>());
+ arr[i] = (int)(*iter).get<double>();
}
bundle_add_byte(bundle, (*it).get("key").to_str().c_str(), arr, size);
delete[] arr;
size_t j = 0;
for (auto byteIter = byteStream.begin(); byteIter != byteStream.end(); ++byteIter, ++j) {
- arr[j] = static_cast<unsigned char>((*byteIter).get<double>());
+ arr[j] = (int)(*byteIter).get<double>();
}
bundle_set_byte_array_element(bundle, (*it).get("key").to_str().c_str(), i, arr,
std::unique_ptr<unsigned char[]> data(new unsigned char[size]);
for (ssize_t i = 0; i < size; i++) {
- data[i] = static_cast<unsigned char>(raw_data[i].get<double>());
+ data[i] = (int)raw_data[i].get<double>();
}
return ReportNdefMessageFromData(data.get(), size, out);
auto type_size = type_data.size();
std::unique_ptr<unsigned char[]> type(new unsigned char[type_size]);
for (size_t i = 0; i < type_size; i++) {
- type[i] = static_cast<unsigned char>(type_data[i].get<double>());
+ type[i] = (int)type_data[i].get<double>();
}
const picojson::array& id_data = FromJson<picojson::array>(record_obj, "id");
auto id_size = id_data.size();
std::unique_ptr<unsigned char[]> id(new unsigned char[id_size]);
for (size_t i = 0; i < id_size; i++) {
- id[i] = static_cast<unsigned char>(id_data[i].get<double>());
+ id[i] = (int)(id_data[i].get<double>());
}
const picojson::array& payload_data = FromJson<picojson::array>(record_obj, "payload");
auto payload_size = payload_data.size();
std::unique_ptr<unsigned char[]> payload(new unsigned char[payload_size]);
for (size_t i = 0; i < payload_size; i++) {
- payload[i] = static_cast<unsigned char>(payload_data[i].get<double>());
+ payload[i] = (int)payload_data[i].get<double>();
}
if ((tnf_from_json < TNF_MIN) || (tnf_from_json > TNF_MAX)) {
return LogAndCreateResult(ErrorCode::TYPE_MISMATCH_ERR, "Type mismatch", ("Not supported TNF"));
std::unique_ptr<unsigned char[]> data(new unsigned char[size]);
for (ssize_t i = 0; i < size; i++) {
- data[i] = static_cast<unsigned char>(raw_data[i].get<double>());
+ data[i] = (int)raw_data[i].get<double>();
}
nfc_ndef_message_h message_handle = NULL;
std::unique_ptr<unsigned char[]> data(new unsigned char[size]);
for (ssize_t i = 0; i < size; i++) {
- data[i] = static_cast<unsigned char>(raw_data[i].get<double>());
+ data[i] = (int)raw_data[i].get<double>();
}
nfc_ndef_record_h handle = NULL;
};
for (size_t i = 0; i < v_aid_size; i++) {
- aid[i] = static_cast<unsigned char>(v_aid[i].get<double>());
+ aid[i] = (int)v_aid[i].get<double>();
}
int ret = smartcard_session_open_basic_channel(session, aid, v_aid_size, P2, &channel);
};
for (size_t i = 0; i < v_aid_size; i++) {
- aid[i] = static_cast<unsigned char>(v_aid[i].get<double>());
+ aid[i] = (int)v_aid[i].get<double>();
}
int ret = smartcard_session_open_logical_channel(session, aid, v_aid_size, P2, &channel);
};
for (size_t i = 0; i < v_cmd_size; i++) {
- cmd[i] = static_cast<unsigned char>(v_cmd[i].get<double>());
+ cmd[i] = (int) v_cmd[i].get<double>();
}
int length = 0;