Skip to content

Commit

Permalink
Removed windows warnings (#58)
Browse files Browse the repository at this point in the history
Signed-off-by: ahcorde <[email protected]>
Signed-off-by: Louise Poubel <[email protected]>

Co-authored-by: Louise Poubel <[email protected]>
Co-authored-by: Ian Chen <[email protected]>
Co-authored-by: Steve Peters <[email protected]>
  • Loading branch information
4 people authored Dec 7, 2020
1 parent 655ffb2 commit 3dfb50d
Show file tree
Hide file tree
Showing 43 changed files with 497 additions and 82 deletions.
17 changes: 16 additions & 1 deletion examples/save_image/main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,22 @@
#include <ignition/common/Image.hh>
#include <ignition/common/Console.hh>
#include <ignition/math/Helpers.hh>
#include <ignition/rendering.hh>

// TODO(louise) Remove these pragmas once ign-rendering is disabling the
// warnings
#ifdef _WIN32
#pragma warning(push)
#pragma warning(disable: 4251)
#endif
#include <ignition/rendering/Material.hh>
#include <ignition/rendering/RenderEngine.hh>
#include <ignition/rendering/RenderingIface.hh>
#include <ignition/rendering/Scene.hh>
#include <ignition/rendering/Visual.hh>
#ifdef _WIN32
#pragma warning(pop)
#endif

#include <ignition/sensors.hh>

void OnImageFrame(const ignition::msgs::Image &_image)
Expand Down
3 changes: 3 additions & 0 deletions include/ignition/sensors/AirPressureSensor.hh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

#include <sdf/sdf.hh>

#include <ignition/common/SuppressWarning.hh>
#include <ignition/common/Time.hh>

#include <ignition/sensors/config.hh>
Expand Down Expand Up @@ -84,9 +85,11 @@ namespace ignition
/// \return Verical reference position in meters
public: double ReferenceAltitude() const;

IGN_COMMON_WARN_IGNORE__DLL_INTERFACE_MISSING
/// \brief Data pointer for private data
/// \internal
private: std::unique_ptr<AirPressureSensorPrivate> dataPtr;
IGN_COMMON_WARN_RESUME__DLL_INTERFACE_MISSING
};
}
}
Expand Down
3 changes: 3 additions & 0 deletions include/ignition/sensors/AltimeterSensor.hh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

#include <sdf/sdf.hh>

#include <ignition/common/SuppressWarning.hh>
#include <ignition/common/Time.hh>

#include <ignition/sensors/config.hh>
Expand Down Expand Up @@ -101,9 +102,11 @@ namespace ignition
/// \return Vertical velocity in meters per second
public: double VerticalVelocity() const;

IGN_COMMON_WARN_IGNORE__DLL_INTERFACE_MISSING
/// \brief Data pointer for private data
/// \internal
private: std::unique_ptr<AltimeterSensorPrivate> dataPtr;
IGN_COMMON_WARN_RESUME__DLL_INTERFACE_MISSING
};
}
}
Expand Down
21 changes: 21 additions & 0 deletions include/ignition/sensors/CameraSensor.hh
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,29 @@
#include <sdf/sdf.hh>

#include <ignition/common/PluginMacros.hh>
#include <ignition/common/SuppressWarning.hh>
#include <ignition/common/Time.hh>

#ifdef _WIN32
#pragma warning(push)
#pragma warning(disable: 4005)
#pragma warning(disable: 4251)
#endif
#include <ignition/msgs.hh>
#ifdef _WIN32
#pragma warning(pop)
#endif

// TODO(louise) Remove these pragmas once ign-rendering is disabling the
// warnings
#ifdef _WIN32
#pragma warning(push)
#pragma warning(disable: 4251)
#endif
#include <ignition/rendering/Camera.hh>
#ifdef _WIN32
#pragma warning(pop)
#endif

#include "ignition/sensors/camera/Export.hh"
#include "ignition/sensors/config.hh"
Expand Down Expand Up @@ -162,9 +181,11 @@ namespace ignition
/// \param[in] _scene Pointer to the new scene.
private: void OnSceneChange(ignition::rendering::ScenePtr /*_scene*/);

IGN_COMMON_WARN_IGNORE__DLL_INTERFACE_MISSING
/// \brief Data pointer for private data
/// \internal
private: std::unique_ptr<CameraSensorPrivate> dataPtr;
IGN_COMMON_WARN_RESUME__DLL_INTERFACE_MISSING
};
}
}
Expand Down
23 changes: 21 additions & 2 deletions include/ignition/sensors/DepthCameraSensor.hh
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,30 @@
#include <sdf/sdf.hh>

#include <ignition/common/Event.hh>

#include <ignition/common/PluginMacros.hh>
#include <ignition/common/SuppressWarning.hh>
#include <ignition/common/Time.hh>

#ifdef _WIN32
#pragma warning(push)
#pragma warning(disable: 4005)
#pragma warning(disable: 4251)
#endif
#include <ignition/msgs.hh>
#ifdef _WIN32
#pragma warning(pop)
#endif

// TODO(louise) Remove these pragmas once ign-rendering is disabling the
// warnings
#ifdef _WIN32
#pragma warning(push)
#pragma warning(disable: 4251)
#endif
#include <ignition/rendering/DepthCamera.hh>
#ifdef _WIN32
#pragma warning(pop)
#endif

#include "ignition/sensors/depth_camera/Export.hh"
#include "ignition/sensors/CameraSensor.hh"
Expand Down Expand Up @@ -80,7 +97,7 @@ namespace ignition
/// \param[in] _now The current time
/// \return true if the update was successfull
public: virtual bool IGN_DEPRECATED(4) Update(
const common::Time &_now) override;
const ignition::common::Time &_now) override;

/// \brief Force the sensor to generate data
/// \param[in] _now The current time
Expand Down Expand Up @@ -158,9 +175,11 @@ namespace ignition
private: void OnSceneChange(ignition::rendering::ScenePtr /*_scene*/)
{ }

IGN_COMMON_WARN_IGNORE__DLL_INTERFACE_MISSING
/// \brief Data pointer for private data
/// \internal
private: std::unique_ptr<DepthCameraSensorPrivate> dataPtr;
IGN_COMMON_WARN_RESUME__DLL_INTERFACE_MISSING
};
}
}
Expand Down
13 changes: 13 additions & 0 deletions include/ignition/sensors/GpuLidarSensor.hh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,18 @@

#include <sdf/sdf.hh>

#include <ignition/common/SuppressWarning.hh>

// TODO(louise) Remove these pragmas once ign-rendering is disabling the
// warnings
#ifdef _WIN32
#pragma warning(push)
#pragma warning(disable: 4251)
#endif
#include <ignition/rendering/GpuRays.hh>
#ifdef _WIN32
#pragma warning(pop)
#endif

#include "ignition/sensors/gpu_lidar/Export.hh"
#include "ignition/sensors/RenderingEvents.hh"
Expand Down Expand Up @@ -123,9 +134,11 @@ namespace ignition
unsigned int _heighti, unsigned int _channels,
const std::string &/*_format*/)> _subscriber) override;

IGN_COMMON_WARN_IGNORE__DLL_INTERFACE_MISSING
/// \brief Data pointer for private data
/// \internal
private: std::unique_ptr<GpuLidarSensorPrivate> dataPtr;
IGN_COMMON_WARN_RESUME__DLL_INTERFACE_MISSING
};
}
}
Expand Down
9 changes: 9 additions & 0 deletions include/ignition/sensors/ImageGaussianNoiseModel.hh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,16 @@

#include <sdf/sdf.hh>

// TODO(louise) Remove these pragmas once ign-rendering is disabling the
// warnings
#ifdef _WIN32
#pragma warning(push)
#pragma warning(disable: 4251)
#endif
#include <ignition/rendering/Camera.hh>
#ifdef _WIN32
#pragma warning(pop)
#endif

#include "ignition/sensors/config.hh"
#include "ignition/sensors/GaussianNoiseModel.hh"
Expand Down
3 changes: 3 additions & 0 deletions include/ignition/sensors/ImuSensor.hh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

#include <sdf/sdf.hh>

#include <ignition/common/SuppressWarning.hh>
#include <ignition/common/Time.hh>
#include <ignition/math/Pose3.hh>

Expand Down Expand Up @@ -128,9 +129,11 @@ namespace ignition
/// \return Gravity vectory in meters per second squared.
public: math::Vector3d Gravity() const;

IGN_COMMON_WARN_IGNORE__DLL_INTERFACE_MISSING
/// \brief Data pointer for private data
/// \internal
private: std::unique_ptr<ImuSensorPrivate> dataPtr;
IGN_COMMON_WARN_RESUME__DLL_INTERFACE_MISSING
};
}
}
Expand Down
5 changes: 5 additions & 0 deletions include/ignition/sensors/Lidar.hh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include <string>
#include <vector>

#include <ignition/common/SuppressWarning.hh>
#include <ignition/common/Event.hh>

#include "ignition/sensors/lidar/Export.hh"
Expand Down Expand Up @@ -242,8 +243,10 @@ namespace ignition
// Documentation inherited
public: virtual bool IsActive() const;

IGN_COMMON_WARN_IGNORE__DLL_INTERFACE_MISSING
/// \brief Just a mutex for thread safety
public: mutable std::mutex lidarMutex;
IGN_COMMON_WARN_RESUME__DLL_INTERFACE_MISSING

/// \brief Raw buffer of laser data.
public: float *laserBuffer = nullptr;
Expand All @@ -263,9 +266,11 @@ namespace ignition
unsigned int _heighti, unsigned int _channels,
const std::string &/*_format*/)> _subscriber);

IGN_COMMON_WARN_IGNORE__DLL_INTERFACE_MISSING
/// \brief Data pointer for private data
/// \internal
private: std::unique_ptr<LidarPrivate> dataPtr;
IGN_COMMON_WARN_RESUME__DLL_INTERFACE_MISSING
};
}
}
Expand Down
11 changes: 11 additions & 0 deletions include/ignition/sensors/LogicalCameraSensor.hh
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,20 @@
#include <sdf/sdf.hh>

#include <ignition/common/PluginMacros.hh>
#include <ignition/common/SuppressWarning.hh>
#include <ignition/common/Time.hh>

#include <ignition/math/Angle.hh>

#ifdef _WIN32
#pragma warning(push)
#pragma warning(disable: 4005)
#pragma warning(disable: 4251)
#endif
#include <ignition/msgs.hh>
#ifdef _WIN32
#pragma warning(pop)
#endif

#include "ignition/sensors/config.hh"
#include "ignition/sensors/Export.hh"
Expand Down Expand Up @@ -110,9 +119,11 @@ namespace ignition
/// \return List of detected models.
public: msgs::LogicalCameraImage Image() const;

IGN_COMMON_WARN_IGNORE__DLL_INTERFACE_MISSING
/// \brief Data pointer for private data
/// \internal
private: std::unique_ptr<LogicalCameraSensorPrivate> dataPtr;
IGN_COMMON_WARN_RESUME__DLL_INTERFACE_MISSING
};
}
}
Expand Down
3 changes: 3 additions & 0 deletions include/ignition/sensors/MagnetometerSensor.hh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

#include <sdf/sdf.hh>

#include <ignition/common/SuppressWarning.hh>
#include <ignition/common/Time.hh>
#include <ignition/math/Pose3.hh>

Expand Down Expand Up @@ -97,9 +98,11 @@ namespace ignition
/// \return Magnetic field vector in body frame
public: math::Vector3d MagneticField() const;

IGN_COMMON_WARN_IGNORE__DLL_INTERFACE_MISSING
/// \brief Data pointer for private data
/// \internal
private: std::unique_ptr<MagnetometerSensorPrivate> dataPtr;
IGN_COMMON_WARN_RESUME__DLL_INTERFACE_MISSING
};
}
}
Expand Down
3 changes: 3 additions & 0 deletions include/ignition/sensors/Manager.hh
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include <type_traits>
#include <vector>
#include <sdf/sdf.hh>
#include <ignition/common/SuppressWarning.hh>
#include <ignition/common/Time.hh>
#include <ignition/common/Console.hh>
#include <ignition/sensors/config.hh>
Expand Down Expand Up @@ -212,8 +213,10 @@ namespace ignition
private: ignition::sensors::SensorId LoadSensorPlugin(
const std::string &_filename, sdf::ElementPtr _sdf);

IGN_COMMON_WARN_IGNORE__DLL_INTERFACE_MISSING
/// \brief private data pointer
private: std::unique_ptr<ManagerPrivate> dataPtr;
IGN_COMMON_WARN_RESUME__DLL_INTERFACE_MISSING
};
}
}
Expand Down
16 changes: 15 additions & 1 deletion include/ignition/sensors/RenderingEvents.hh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,19 @@
#define IGNITION_SENSORS_RENDERINGEVENTS_HH_

#include <ignition/common/Event.hh>
#include <ignition/rendering/Scene.hh>
#include <ignition/common/SuppressWarning.hh>

// TODO(louise) Remove these pragmas once ign-rendering is disabling the
// warnings
#ifdef _WIN32
#pragma warning(push)
#pragma warning(disable: 4251)
#endif
#include <ignition/rendering/RenderTypes.hh>
#ifdef _WIN32
#pragma warning(pop)
#endif

#include <ignition/sensors/config.hh>
#include <ignition/sensors/rendering/Export.hh>

Expand All @@ -43,10 +55,12 @@ namespace ignition
std::function<void(const ignition::rendering::ScenePtr &)>
_callback);

IGN_COMMON_WARN_IGNORE__DLL_INTERFACE_MISSING
/// \brief Event that is used to trigger callbacks when the scene
/// is changed
public: static ignition::common::EventT<
void(const ignition::rendering::ScenePtr &)> sceneEvent;
IGN_COMMON_WARN_RESUME__DLL_INTERFACE_MISSING
};
}
}
Expand Down
16 changes: 14 additions & 2 deletions include/ignition/sensors/RenderingSensor.hh
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,18 @@

#include <memory>

#include <ignition/rendering/Scene.hh>
#include <ignition/rendering/Sensor.hh>
#include <ignition/common/SuppressWarning.hh>

// TODO(louise) Remove these pragmas once ign-rendering is disabling the
// warnings
#ifdef _WIN32
#pragma warning(push)
#pragma warning(disable: 4251)
#endif
#include <ignition/rendering/RenderTypes.hh>
#ifdef _WIN32
#pragma warning(pop)
#endif

#include "ignition/sensors/rendering/Export.hh"
#include "ignition/sensors/Sensor.hh"
Expand Down Expand Up @@ -76,9 +86,11 @@ namespace ignition
/// \param[in] _sensor Sensor to add.
protected: void AddSensor(rendering::SensorPtr _sensor);

IGN_COMMON_WARN_IGNORE__DLL_INTERFACE_MISSING
/// \internal
/// \brief Data pointer for private data
private: std::unique_ptr<RenderingSensorPrivate> dataPtr;
IGN_COMMON_WARN_RESUME__DLL_INTERFACE_MISSING
};
}
}
Expand Down
Loading

0 comments on commit 3dfb50d

Please sign in to comment.