1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-29 23:33:05 +04:00

Merge pull request #21107 from take1014:remove_assert_21038

resolves #21038

* remove C assert

* revert C header

* fix several points in review

* fix test_ds.cpp
This commit is contained in:
yuki takehara
2021-11-28 03:34:52 +09:00
committed by GitHub
parent b55d8f46f4
commit a6277370ca
81 changed files with 277 additions and 286 deletions
-1
View File
@@ -58,7 +58,6 @@
#include <string.h>
#include <limits.h>
#include <ctype.h>
#include <assert.h>
#if defined _WIN32 || defined WINCE
#include <windows.h>
+1 -1
View File
@@ -119,7 +119,7 @@ static CvWindow* hg_windows = 0;
if( !(exp) ) \
{ \
printf("Assertion: %s %s: %d\n", #exp, __FILE__, __LINE__);\
assert(exp); \
CV_Assert(exp); \
}
static int wasInitialized = 0;
+1 -1
View File
@@ -356,7 +356,7 @@ static void cvImageWidget_set_size(GtkWidget * widget, int max_width, int max_he
}
assert( image_widget->scaled_image );
CV_Assert( image_widget->scaled_image );
}
static void
+3 -4
View File
@@ -60,7 +60,6 @@ using namespace cv;
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <assert.h>
#ifdef HAVE_OPENGL
#include <memory>
@@ -105,7 +104,7 @@ static const char* trackbar_text =
static void FillBitmapInfo( BITMAPINFO* bmi, int width, int height, int bpp, int origin )
{
assert( bmi && width >= 0 && height >= 0 && (bpp == 8 || bpp == 24 || bpp == 32));
CV_Assert( bmi && width >= 0 && height >= 0 && (bpp == 8 || bpp == 24 || bpp == 32));
BITMAPINFOHEADER* bmih = &(bmi->bmiHeader);
@@ -1107,7 +1106,7 @@ static RECT icvCalcWindowRect( CvWindow* window )
{
RECT crect = { 0 }, trect = { 0 }, rect = { 0 };
assert(window);
CV_Assert(window);
GetClientRect(window->frame, &crect);
if (window->toolbar.toolbar)
@@ -1157,7 +1156,7 @@ static bool icvGetBitmapData( CvWindow* window, SIZE* size, int* channels, void*
static void icvUpdateWindowPos( CvWindow* window )
{
RECT rect = { 0 };
assert(window);
CV_Assert(window);
if( (window->flags & CV_WINDOW_AUTOSIZE) && window->image )
{
-1
View File
@@ -30,7 +30,6 @@
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <assert.h>
#include <opencv2\highgui.hpp>
#include <opencv2\highgui\highgui_winrt.hpp>
#include "window_winrt_bridge.hpp"