Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
sytelus committed Mar 4, 2018
1 parent 15702df commit 6a68d6b
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions AirLib/include/common/AirSimSettings.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -397,11 +397,7 @@ struct AirSimSettings {
if (json_parent.getChild(child_index, json_settings_child)) {
CaptureSetting capture_setting;
createCaptureSettings(json_settings_child, capture_setting);
if (capture_setting.image_type >= -1 && capture_setting.image_type < static_cast<int>(capture_settings.size()))
capture_settings[capture_setting.image_type] = capture_setting;
else
//TODO: below exception doesn't actually get raised right now because of issue in Unreal Engine?
throw std::invalid_argument(std::string("ImageType must be >= -1 and < ") + std::to_string(capture_settings.size()));
capture_settings[capture_setting.image_type] = capture_setting;
}
}
}
Expand Down Expand Up @@ -441,11 +437,7 @@ struct AirSimSettings {
if (json_parent.getChild(child_index, json_settings_child)) {
NoiseSetting noise_setting;
createNoiseSettings(json_settings_child, noise_setting);
if (noise_setting.ImageType >= -1 && noise_setting.ImageType < static_cast<int>(noise_settings.size()))
noise_settings[noise_setting.ImageType] = noise_setting;
else
//TODO: below exception doesn't actually get raised right now because of issue in Unreal Engine?
throw std::invalid_argument("ImageType must be >= -1 and < " + std::to_string(noise_settings.size()));
noise_settings[noise_setting.ImageType] = noise_setting;
}
}
}
Expand Down

0 comments on commit 6a68d6b

Please sign in to comment.