Skip to content

Commit

Permalink
Fixed compile problems under Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
heikohimu committed Mar 16, 2021
1 parent 1bbf672 commit ec4ff30
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
5 changes: 5 additions & 0 deletions rc_genicam_api/imagelist.cc
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@

#include <algorithm>

#ifdef _WIN32
#undef min
#undef max
#endif

namespace rcg
{

Expand Down
10 changes: 5 additions & 5 deletions tools/gc_stream.cc
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ std::string storeBufferAsDisparity(const std::shared_ptr<GenApi::CNodeMapRef> &n
// store image

rcg::Image image(buffer, part);
dispname=storeImageAsDisparityPFM(name.str(), image, inv, scale, offset);
dispname=storeImageAsDisparityPFM(name.str(), image, inv, static_cast<float>(scale), static_cast<float>(offset));
}
else if (buffer->getIsIncomplete())
{
Expand Down Expand Up @@ -273,7 +273,7 @@ void storeParameter(const std::shared_ptr<GenApi::CNodeMapRef> &nodemap,

rcg::setString(nodemap, "ChunkComponentSelector", component.c_str());

int width=rcg::getInteger(nodemap, "ChunkWidth");
int width=static_cast<int>(rcg::getInteger(nodemap, "ChunkWidth"));
if (height == 0) height=rcg::getInteger(nodemap, "ChunkHeight");
double f=rcg::getFloat(nodemap, "ChunkScan3dFocalLength");
double t=rcg::getFloat(nodemap, "ChunkScan3dBaseline");
Expand Down Expand Up @@ -313,23 +313,23 @@ void storeParameter(const std::shared_ptr<GenApi::CNodeMapRef> &nodemap,

try
{
float v=rcg::getFloat(nodemap, "ChunkRcNoise", 0, 0, true);
float v=static_cast<float>(rcg::getFloat(nodemap, "ChunkRcNoise", 0, 0, true));
out << "camera.noise=" << v << std::endl;
}
catch (const std::exception &)
{ }

try
{
float v=rcg::getFloat(nodemap, "ChunkRcBrightness", 0, 0, true);
float v=static_cast<float>(rcg::getFloat(nodemap, "ChunkRcBrightness", 0, 0, true));
out << "camera.brightness=" << v << std::endl;
}
catch (const std::exception &)
{ }

try
{
float v=rcg::getFloat(nodemap, "ChunkRcOut1Reduction", 0, 0, true);
float v=static_cast<float>(rcg::getFloat(nodemap, "ChunkRcOut1Reduction", 0, 0, true));
out << "camera.out1_reduction=" << v << std::endl;
}
catch (const std::exception &)
Expand Down

0 comments on commit ec4ff30

Please sign in to comment.