Bindings: constify data pointer
This commit is contained in:
parent
8b9fa09859
commit
895cbcdd3c
|
@ -305,7 +305,7 @@ shared_ptr<Packet> Context::create_logic_packet(
|
|||
|
||||
shared_ptr<Packet> Context::create_analog_packet(
|
||||
vector<shared_ptr<Channel> > channels,
|
||||
float *data_pointer, unsigned int num_samples, const Quantity *mq,
|
||||
const float *data_pointer, unsigned int num_samples, const Quantity *mq,
|
||||
const Unit *unit, vector<const QuantityFlag *> mqflags)
|
||||
{
|
||||
auto analog = g_new0(struct sr_datafeed_analog, 1);
|
||||
|
@ -343,7 +343,7 @@ shared_ptr<Packet> Context::create_analog_packet(
|
|||
spec->spec_digits = 0;
|
||||
|
||||
analog->num_samples = num_samples;
|
||||
analog->data = data_pointer;
|
||||
analog->data = (float*)data_pointer;
|
||||
auto packet = g_new(struct sr_datafeed_packet, 1);
|
||||
packet->type = SR_DF_ANALOG;
|
||||
packet->payload = analog;
|
||||
|
|
|
@ -283,7 +283,7 @@ public:
|
|||
/** Create an analog packet. */
|
||||
shared_ptr<Packet> create_analog_packet(
|
||||
vector<shared_ptr<Channel> > channels,
|
||||
float *data_pointer, unsigned int num_samples, const Quantity *mq,
|
||||
const float *data_pointer, unsigned int num_samples, const Quantity *mq,
|
||||
const Unit *unit, vector<const QuantityFlag *> mqflags);
|
||||
/** Load a saved session.
|
||||
* @param filename File name string. */
|
||||
|
|
Loading…
Reference in New Issue