mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Fix CVF compile flags on GNUCXX
This commit is contained in:
@@ -34,7 +34,7 @@ option(CEE_WARNINGS_AS_ERRORS "Make all warnings into errors" ON)
|
|||||||
if (CMAKE_COMPILER_IS_GNUCXX)
|
if (CMAKE_COMPILER_IS_GNUCXX)
|
||||||
|
|
||||||
# Setup our BASE compile flags
|
# Setup our BASE compile flags
|
||||||
set(CEE_BASE_CXX_FLAGS "-Wall -Wextra -pedantic")
|
set(CEE_BASE_CXX_FLAGS "-Wall -Wextra -pedantic -std=c++11")
|
||||||
|
|
||||||
if (CEE_WARNINGS_AS_ERRORS)
|
if (CEE_WARNINGS_AS_ERRORS)
|
||||||
set(CEE_BASE_CXX_FLAGS "-Werror ${CEE_BASE_CXX_FLAGS}")
|
set(CEE_BASE_CXX_FLAGS "-Werror ${CEE_BASE_CXX_FLAGS}")
|
||||||
|
|||||||
@@ -423,8 +423,8 @@ void OverlayScalarMapperLegend::renderLegend(OpenGLContext* oglContext, OverlayC
|
|||||||
for (iPx = 0; iPx < legendHeightPixelCount; iPx++)
|
for (iPx = 0; iPx < legendHeightPixelCount; iPx++)
|
||||||
{
|
{
|
||||||
const Color3ub& clr = m_scalarMapper->mapToColor(m_scalarMapper->domainValue((iPx+0.5)/legendHeightPixelCount));
|
const Color3ub& clr = m_scalarMapper->mapToColor(m_scalarMapper->domainValue((iPx+0.5)/legendHeightPixelCount));
|
||||||
float y0 = static_cast<float>(layout->legendRect.min().y() + iPx);
|
float y0 = layout->legendRect.min().y() + static_cast<float>(iPx);
|
||||||
float y1 = static_cast<float>(layout->legendRect.min().y() + iPx + 1);
|
float y1 = layout->legendRect.min().y() + static_cast<float>(iPx + 1);
|
||||||
|
|
||||||
// Dynamic coordinates for rectangle
|
// Dynamic coordinates for rectangle
|
||||||
v0[1] = v1[1] = y0;
|
v0[1] = v1[1] = y0;
|
||||||
@@ -575,8 +575,8 @@ void OverlayScalarMapperLegend::renderLegendImmediateMode(OpenGLContext* oglCont
|
|||||||
for (iPx = 0; iPx < legendHeightPixelCount; iPx++)
|
for (iPx = 0; iPx < legendHeightPixelCount; iPx++)
|
||||||
{
|
{
|
||||||
const Color3ub& clr = m_scalarMapper->mapToColor(m_scalarMapper->domainValue((iPx+0.5)/legendHeightPixelCount));
|
const Color3ub& clr = m_scalarMapper->mapToColor(m_scalarMapper->domainValue((iPx+0.5)/legendHeightPixelCount));
|
||||||
float y0 = static_cast<float>(layout->legendRect.min().y() + iPx);
|
float y0 = layout->legendRect.min().y() + static_cast<float>(iPx);
|
||||||
float y1 = static_cast<float>(layout->legendRect.min().y() + iPx + 1);
|
float y1 = layout->legendRect.min().y() + static_cast<float>(iPx + 1);
|
||||||
|
|
||||||
// Dynamic coordinates for rectangle
|
// Dynamic coordinates for rectangle
|
||||||
v0[1] = v1[1] = y0;
|
v0[1] = v1[1] = y0;
|
||||||
|
|||||||
@@ -53,9 +53,9 @@ namespace cvf {
|
|||||||
/// Configured by specifying a number of level colors and a min/max range.
|
/// Configured by specifying a number of level colors and a min/max range.
|
||||||
//==================================================================================================
|
//==================================================================================================
|
||||||
ScalarMapperContinuousLog::ScalarMapperContinuousLog()
|
ScalarMapperContinuousLog::ScalarMapperContinuousLog()
|
||||||
: m_hasNegativeRange(false),
|
: m_logRange(0.0)
|
||||||
m_logRange(0.0),
|
, m_logRangeMin(0.0)
|
||||||
m_logRangeMin(0.0)
|
, m_hasNegativeRange(false)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -55,8 +55,8 @@ ScalarMapperRangeBased::ScalarMapperRangeBased()
|
|||||||
m_rangeMax(cvf::UNDEFINED_DOUBLE),
|
m_rangeMax(cvf::UNDEFINED_DOUBLE),
|
||||||
m_decadeLevelCount(1),
|
m_decadeLevelCount(1),
|
||||||
m_levelCount(8),
|
m_levelCount(8),
|
||||||
m_textureSize(2048), // Large enough, I guess and a power of two
|
m_adjustLevels(true),
|
||||||
m_adjustLevels(true)
|
m_textureSize(2048) // Large enough, I guess and a power of two
|
||||||
{
|
{
|
||||||
m_interpolatedUserGradientColors.resize(m_textureSize);
|
m_interpolatedUserGradientColors.resize(m_textureSize);
|
||||||
m_interpolatedUserGradientColors.setAll(Color3ub::WHITE);
|
m_interpolatedUserGradientColors.setAll(Color3ub::WHITE);
|
||||||
@@ -220,7 +220,7 @@ void ScalarMapperRangeBased::majorTickValues( std::vector<double>* domainValues)
|
|||||||
domainValues->push_back(domainValue(0));
|
domainValues->push_back(domainValue(0));
|
||||||
if (m_levelCount > 1)
|
if (m_levelCount > 1)
|
||||||
{
|
{
|
||||||
double stepSizeNorm = 1.0/m_levelCount;
|
double stepSizeNorm = 1.0/static_cast<double>(m_levelCount);
|
||||||
size_t i;
|
size_t i;
|
||||||
|
|
||||||
if (m_adjustLevels) // adjust levels
|
if (m_adjustLevels) // adjust levels
|
||||||
@@ -254,7 +254,7 @@ void ScalarMapperRangeBased::majorTickValues( std::vector<double>* domainValues)
|
|||||||
double prevDomValue = domainValue(0);
|
double prevDomValue = domainValue(0);
|
||||||
for (i = 1; i < m_levelCount; ++i)
|
for (i = 1; i < m_levelCount; ++i)
|
||||||
{
|
{
|
||||||
double newLevel = domainValue(stepSizeNorm*i);
|
double newLevel = domainValue(stepSizeNorm*static_cast<double>(i));
|
||||||
|
|
||||||
if (newLevel != prevDomValue) domainValues->push_back(newLevel);
|
if (newLevel != prevDomValue) domainValues->push_back(newLevel);
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ include_directories(${LibGuiQt_SOURCE_DIR})
|
|||||||
include_directories(${LibUtilities_SOURCE_DIR})
|
include_directories(${LibUtilities_SOURCE_DIR})
|
||||||
include_directories(${SnippetsBasis_SOURCE_DIR})
|
include_directories(${SnippetsBasis_SOURCE_DIR})
|
||||||
|
|
||||||
set(CEE_LIBS SnippetsBasis freetype LibFreeType LibUtilities LibGuiQt LibViewing LibRender LibGeometry LibIo LibCore opengl32)
|
set(CEE_LIBS SnippetsBasis freetype LibFreeType LibUtilities LibGuiQt LibViewing LibRender LibGeometry LibIo LibCore)
|
||||||
|
|
||||||
include_directories(${SnippetsModules_SOURCE_DIR})
|
include_directories(${SnippetsModules_SOURCE_DIR})
|
||||||
set(CEE_LIBS LibStructGrid ${CEE_LIBS})
|
set(CEE_LIBS LibStructGrid ${CEE_LIBS})
|
||||||
|
|||||||
Reference in New Issue
Block a user