Commit 57b0a16e authored by Victor Poughon's avatar Victor Poughon

Merge branch '1874-fix-s1-assert' into 'develop'

Resolve "Assertion error on Sentinel1 product in debug build"

Closes #1874

See merge request !478
parents eb92becf 75ad95fc
Pipeline #1240 passed with stages
in 4 minutes and 15 seconds
......@@ -1278,7 +1278,6 @@ bool ossimSarSensorModel::worldToAzimuthRangeTime(const ossimGpt& worldPt, TimeT
for (std::size_t idx=0 ; idx!=nbCoords ; ++idx)
{
const int pos = s_printf(prefix_, "%s[%d].", sr_gr_prefix.c_str(), idx);
assert(pos >= sizeof(SR_PREFIX)+4 && pos < sizeof(prefix_));
std::string prefix(prefix_, pos);
ossimSarSensorModel::CoordinateConversionRecordType coordRecord;
......@@ -1311,7 +1310,6 @@ bool ossimSarSensorModel::worldToAzimuthRangeTime(const ossimGpt& worldPt, TimeT
for (std::size_t idx=0 ; idx!=conversionRecords.size() ; ++idx)
{
const int pos = s_printf(prefix_, "%s[%d].", sr_gr_prefix.c_str(), idx);
assert(pos >= sizeof(SR_PREFIX)+4 && pos < sizeof(prefix_));
std::string prefix(prefix_, pos);
......
......@@ -1114,7 +1114,7 @@ namespace ossimplugins
for(std::vector<ossimRefPtr<ossimXmlNode> >::iterator itNode = xnodes.begin(); itNode!=xnodes.end();++itNode, ++idx)
{
int pos = s_printf(prefix, "%s[%d].", sr_gr_prefix.c_str(), idx);
assert(pos >= sizeof(SR_PREFIX)+4 && pos < sizeof(prefix));
assert(pos >= SR_PREFIX.size()+4 && pos < sizeof(prefix));
addMandatory(theProductKwl, prefix + keyAzimuthTime,**itNode, attAzimuthTime);
addMandatory(theProductKwl, prefix + rg0_xpath, **itNode, rg0_xpath);
......@@ -1153,7 +1153,7 @@ namespace ossimplugins
for(std::vector<ossimRefPtr<ossimXmlNode> >::iterator itNode = xnodes.begin(); itNode!=xnodes.end();++itNode,++idx)
{
int pos = s_printf(prefix, "%s[%d].", GCP_PREFIX.c_str(), idx);
assert(pos >= sizeof(SR_PREFIX)+4 && pos < 1024);
assert(pos >= GCP_PREFIX.size()+4 && pos < sizeof(prefix));
#if defined(USE_BOOST_TIME)
const TimeType azimuthTime = getTimeFromFirstNode(**itNode, attAzimuthTime);
add(theProductKwl, prefix, attAzimuthTime, azimuthTime);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment