project: Fix even more warnings

This commit is contained in:
Michael Fabian 'Xaymar' Dirks 2019-03-01 12:00:30 +01:00
parent da6feda981
commit ba00fbb97e
5 changed files with 21 additions and 8 deletions

View File

@ -1,5 +1,12 @@
#ifdef _MSC_VER
#pragma warning(push)
#pragma warning(disable : 4201)
#endif
#include <obs.h>
#include <obs-module.h>
#ifdef _MSC_VER
#pragma warning(pop)
#endif
OBS_DECLARE_MODULE();
OBS_MODULE_AUTHOR("@PROJECT_AUTHORS@");

View File

@ -134,7 +134,7 @@ filter::blur::blur_factory::blur_factory()
this->gaussian_widths.resize(max_kernel_size + 1);
for (size_t w = 1; w <= max_kernel_size; w++) {
for (double_t h = FLT_EPSILON; h <= w; h += search_density) {
if (util::math::gaussian<double_t>(w, h) > search_threshold) {
if (util::math::gaussian<double_t>(double_t(w), h) > search_threshold) {
this->gaussian_widths[w] = h;
break;
}

View File

@ -334,7 +334,7 @@ filter::transform::transform_instance::transform_instance(obs_data_t* data, obs_
{
m_source_rendertarget = std::make_shared<gs::rendertarget>(GS_RGBA, GS_ZS_NONE);
m_shape_rendertarget = std::make_shared<gs::rendertarget>(GS_RGBA, GS_ZS_NONE);
m_vertex_buffer = std::make_shared<gs::vertex_buffer>(4u, 1u);
m_vertex_buffer = std::make_shared<gs::vertex_buffer>(uint32_t(4u), uint8_t(1u));
m_position = std::make_unique<util::vec3a>();
m_rotation = std::make_unique<util::vec3a>();

View File

@ -16,12 +16,12 @@
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
#include "gfx-effect-source.hpp"
#include <fstream>
#include <sys/stat.h>
#include "strings.hpp"
#include <cfloat>
#include <climits>
#include <cstdint>
#include <fstream>
#include <sys/stat.h>
#include "strings.hpp"
// OBS
#ifdef _MSC_VER
@ -96,8 +96,7 @@ bool gfx::effect_source::property_texture_type_modified(void* priv, obs_properti
return true;
}
bool gfx::effect_source::property_texture_input_modified(void*, obs_properties_t*, obs_property_t*,
obs_data_t*)
bool gfx::effect_source::property_texture_input_modified(void*, obs_properties_t*, obs_property_t*, obs_data_t*)
{
return false;
}

View File

@ -50,7 +50,14 @@ struct graphics_subsystem {
#if defined(WIN32) || defined(WIN64)
#include <d3d11.h>
#include <dxgi.h>
#ifdef _MSC_VER
#pragma warning(push)
#pragma warning(disable : 4201)
#endif
#include <util/windows/ComPtr.hpp>
#ifdef _MSC_VER
#pragma warning(pop)
#endif
// Slaughtered copy of d3d11-subsystem.hpp gs_device. We only need up to device and context, the rest is "unknown" to us.
struct gs_d3d11_device {
@ -71,7 +78,7 @@ gs::mipmapper::~mipmapper()
gs::mipmapper::mipmapper()
{
vertex_buffer = std::make_unique<gs::vertex_buffer>(6, 1);
vertex_buffer = std::make_unique<gs::vertex_buffer>(uint32_t(6u), uint8_t(1u));
auto v0 = vertex_buffer->at(0);
v0.position->x = 0;
v0.position->y = 0;