Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Main Repositories
otb
Commits
bcab0df4
Commit
bcab0df4
authored
Mar 31, 2016
by
Rashad Kanavath
Browse files
COMP: fix compile errors on GCC 4.1.2
parent
8d98bfe1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Code/Common/Core/mvdProcessObjectObserver.cxx
View file @
bcab0df4
...
...
@@ -17,7 +17,7 @@
=========================================================================*/
#include
"mvdProcessObjectObserver.h"
#include
<cassert>
/*****************************************************************************/
/* INCLUDE SECTION */
...
...
Code/Common/Gui/mvdMultiResolutionPyramidWidget.cxx
View file @
bcab0df4
...
...
@@ -29,6 +29,8 @@
//
// System includes (sorted by alphabetic order)
#include
<cassert>
#include
<cmath>
//
// ITK includes (sorted by alphabetic order)
...
...
@@ -40,7 +42,6 @@
// Monteverdi includes (sorted by alphabetic order)
#include
"Gui/mvdGui.h"
namespace
mvd
{
...
...
@@ -250,12 +251,21 @@ MultiResolutionPyramidWidget
m_UI
->
sizeSpinBox
->
setRange
(
1
,
size
);
assert
(
m_GDALOverviewsBuilder
->
CountResolutions
()
>=
m_GDALOverviewsBuilder
->
GetNbResolutions
()
);
// Force C++ implicit cast by declaring local variables to force compiler
// to find correct std::pow() signature.
//
// It fixes compile-time:
// error: call of pow(unsigned int, unsigned int) is ambiguous
double
rf
=
m_GDALOverviewsBuilder
->
GetResolutionFactor
();
int
m
=
m_GDALOverviewsBuilder
->
CountResolutions
()
-
m_GDALOverviewsBuilder
->
GetNbResolutions
();
m_UI
->
sizeSpinBox
->
setValue
(
std
::
pow
(
m_GDALOverviewsBuilder
->
GetResolutionFactor
(),
m_GDALOverviewsBuilder
->
CountResolutions
()
-
m_GDALOverviewsBuilder
->
GetNbResolutions
()
)
static_cast
<
int
>
(
std
::
pow
(
rf
,
m
)
)
);
m_UI
->
sizeSpinBox
->
blockSignals
(
signalsBlocked
);
...
...
@@ -306,18 +316,17 @@ MultiResolutionPyramidWidget
unsigned
int
count
=
m_GDALOverviewsBuilder
->
CountResolutions
();
m_UI
->
sizeSpinBox
->
setValue
(
static_cast
<
int
>
(
std
::
pow
(
m_GDALOverviewsBuilder
->
GetResolutionFactor
(),
count
-
std
::
min
(
m_GDALOverviewsBuilder
->
GetNbResolutions
(),
count
)
)
)
);
// Force C++ implicit cast by declaring local variables to force compiler
// to find correct std::pow() signature.
//
// It fixes compile-time:
// error: call of pow(unsigned int, unsigned int) is ambiguous
double
rf
=
m_GDALOverviewsBuilder
->
GetResolutionFactor
();
int
m
=
count
-
std
::
min
(
m_GDALOverviewsBuilder
->
GetNbResolutions
(),
count
);
m_UI
->
sizeSpinBox
->
blockSignals
(
signalsBlocked
);
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment