linux gcc error related fixes
This commit is contained in:
parent
1fdaa112ea
commit
f41c14f56c
|
@ -114,7 +114,10 @@ void DeviceConfig::load(DataNode *node) {
|
|||
|
||||
|
||||
DeviceConfig *AppConfig::getDevice(std::string deviceId) {
|
||||
DeviceConfig *conf = &deviceConfig[deviceId];
|
||||
if (deviceConfig.find(deviceId) == deviceConfig.end()) {
|
||||
deviceConfig[deviceId] = new DeviceConfig();
|
||||
}
|
||||
DeviceConfig *conf = deviceConfig[deviceId];
|
||||
conf->setDeviceId(deviceId);
|
||||
return conf;
|
||||
}
|
||||
|
@ -143,10 +146,10 @@ bool AppConfig::save() {
|
|||
cfg.rootNode()->setName("cubicsdr_config");
|
||||
DataNode *devices_node = cfg.rootNode()->newChild("devices");
|
||||
|
||||
std::map<std::string, DeviceConfig>::iterator device_config_i;
|
||||
std::map<std::string, DeviceConfig *>::iterator device_config_i;
|
||||
for (device_config_i = deviceConfig.begin(); device_config_i != deviceConfig.end(); device_config_i++) {
|
||||
DataNode *device_node = devices_node->newChild("device");
|
||||
device_config_i->second.save(device_node);
|
||||
device_config_i->second->save(device_node);
|
||||
}
|
||||
|
||||
std::string cfgFileDir = getConfigDir();
|
||||
|
|
|
@ -35,9 +35,9 @@ private:
|
|||
std::string deviceId;
|
||||
std::mutex busy_lock;
|
||||
|
||||
std::atomic<int> ppm, directSampling;
|
||||
std::atomic<bool> iqSwap;
|
||||
std::atomic<long long> offset;
|
||||
std::atomic_int ppm, directSampling;
|
||||
std::atomic_bool iqSwap;
|
||||
std::atomic_llong offset;
|
||||
};
|
||||
|
||||
class AppConfig {
|
||||
|
@ -50,5 +50,5 @@ public:
|
|||
bool reset();
|
||||
|
||||
private:
|
||||
std::map<std::string, DeviceConfig> deviceConfig;
|
||||
std::map<std::string, DeviceConfig *> deviceConfig;
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue