C++: Use C++98 syntax for default arguments to appease SWIG
Looks like SWIG silently ignores default arguments specified via aggregate initialization. This is rather unfortunate, especially if the argument types are complex.
This commit is contained in:
parent
a98729a742
commit
bf03d63565
|
@ -352,8 +352,8 @@ public:
|
||||||
string long_name() const;
|
string long_name() const;
|
||||||
/** Scan for devices and return a list of devices found.
|
/** Scan for devices and return a list of devices found.
|
||||||
* @param options Mapping of (ConfigKey, value) pairs. */
|
* @param options Mapping of (ConfigKey, value) pairs. */
|
||||||
vector<shared_ptr<HardwareDevice> > scan(
|
vector<shared_ptr<HardwareDevice> > scan(const map<const ConfigKey *, Glib::VariantBase>
|
||||||
const map<const ConfigKey *, Glib::VariantBase> &options = {});
|
&options = map<const ConfigKey *, Glib::VariantBase>());
|
||||||
private:
|
private:
|
||||||
struct sr_dev_driver *_structure;
|
struct sr_dev_driver *_structure;
|
||||||
bool _initialized;
|
bool _initialized;
|
||||||
|
@ -798,7 +798,8 @@ public:
|
||||||
map<string, shared_ptr<Option> > options();
|
map<string, shared_ptr<Option> > options();
|
||||||
/** Create an input using this input format.
|
/** Create an input using this input format.
|
||||||
* @param options Mapping of (option name, value) pairs. */
|
* @param options Mapping of (option name, value) pairs. */
|
||||||
shared_ptr<Input> create_input(const map<string, Glib::VariantBase> &options = {});
|
shared_ptr<Input> create_input(const map<string, Glib::VariantBase>
|
||||||
|
&options = map<string, Glib::VariantBase>());
|
||||||
private:
|
private:
|
||||||
explicit InputFormat(const struct sr_input_module *structure);
|
explicit InputFormat(const struct sr_input_module *structure);
|
||||||
~InputFormat();
|
~InputFormat();
|
||||||
|
@ -891,16 +892,15 @@ public:
|
||||||
/** Create an output using this format.
|
/** Create an output using this format.
|
||||||
* @param device Device to output for.
|
* @param device Device to output for.
|
||||||
* @param options Mapping of (option name, value) pairs. */
|
* @param options Mapping of (option name, value) pairs. */
|
||||||
shared_ptr<Output> create_output(
|
shared_ptr<Output> create_output(shared_ptr<Device> device,
|
||||||
shared_ptr<Device> device,
|
const map<string, Glib::VariantBase> &options = map<string, Glib::VariantBase>());
|
||||||
const map<string, Glib::VariantBase> &options = {});
|
|
||||||
/** Create an output using this format.
|
/** Create an output using this format.
|
||||||
* @param filename Name of destination file.
|
* @param filename Name of destination file.
|
||||||
* @param device Device to output for.
|
* @param device Device to output for.
|
||||||
* @param options Mapping of (option name, value) pairs. */
|
* @param options Mapping of (option name, value) pairs. */
|
||||||
shared_ptr<Output> create_output(string filename,
|
shared_ptr<Output> create_output(string filename,
|
||||||
shared_ptr<Device> device,
|
shared_ptr<Device> device,
|
||||||
const map<string, Glib::VariantBase> &options = {});
|
const map<string, Glib::VariantBase> &options = map<string, Glib::VariantBase>());
|
||||||
/**
|
/**
|
||||||
* Checks whether a given flag is set.
|
* Checks whether a given flag is set.
|
||||||
* @param flag Flag to check
|
* @param flag Flag to check
|
||||||
|
|
Loading…
Reference in New Issue