Merge commit '43aec5ad^' into merge-2.4
Conflicts: modules/contrib/src/inputoutput.cpp modules/gpu/perf/perf_imgproc.cpp modules/gpuarithm/perf/perf_element_operations.cpp modules/gpuarithm/src/element_operations.cpp modules/ts/src/precomp.hpp
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
#include "perf_precomp.hpp"
|
||||
#ifdef _MSC_VER
|
||||
# if _MSC_VER >= 1700
|
||||
# pragma warning(disable:4447) // Disable warning 'main' signature found without threading model
|
||||
# endif
|
||||
#endif
|
||||
|
||||
CV_PERF_TEST_MAIN(core)
|
||||
|
@@ -79,10 +79,9 @@ namespace
|
||||
dir->ent.d_name = 0;
|
||||
#ifdef HAVE_WINRT
|
||||
cv::String full_path = cv::String(path) + "\\*";
|
||||
size_t size = mbstowcs(NULL, full_path.c_str(), full_path.size());
|
||||
cv::Ptr<wchar_t> wfull_path = new wchar_t[size+1];
|
||||
wfull_path[size] = 0;
|
||||
mbstowcs(wfull_path, full_path.c_str(), full_path.size());
|
||||
wchar_t wfull_path[MAX_PATH];
|
||||
size_t copied = mbstowcs(wfull_path, full_path.c_str(), MAX_PATH);
|
||||
CV_Assert((copied != MAX_PATH) && (copied != (size_t)-1));
|
||||
dir->handle = ::FindFirstFileExW(wfull_path, FindExInfoStandard,
|
||||
&dir->data, FindExSearchNameMatch, NULL, 0);
|
||||
#else
|
||||
@@ -106,6 +105,7 @@ namespace
|
||||
return 0;
|
||||
}
|
||||
size_t asize = wcstombs(NULL, dir->data.cFileName, 0);
|
||||
CV_Assert((asize != 0) && (asize != (size_t)-1));
|
||||
char* aname = new char[asize+1];
|
||||
aname[asize] = 0;
|
||||
wcstombs(aname, dir->data.cFileName, asize);
|
||||
@@ -146,10 +146,9 @@ static bool isDir(const cv::String& path, DIR* dir)
|
||||
{
|
||||
WIN32_FILE_ATTRIBUTE_DATA all_attrs;
|
||||
#ifdef HAVE_WINRT
|
||||
size_t size = mbstowcs(NULL, path.c_str(), path.size());
|
||||
cv::Ptr<wchar_t> wpath = new wchar_t[size+1];
|
||||
wpath[size] = 0;
|
||||
mbstowcs(wpath, path.c_str(), path.size());
|
||||
wchar_t wpath[MAX_PATH];
|
||||
size_t copied = mbstowcs(wpath, path.c_str(), MAX_PATH);
|
||||
CV_Assert((copied != MAX_PATH) && (copied != (size_t)-1));
|
||||
::GetFileAttributesExW(wpath, GetFileExInfoStandard, &all_attrs);
|
||||
#else
|
||||
::GetFileAttributesExA(path.c_str(), GetFileExInfoStandard, &all_attrs);
|
||||
|
@@ -42,6 +42,12 @@
|
||||
|
||||
#include "precomp.hpp"
|
||||
|
||||
#ifdef _MSC_VER
|
||||
# if _MSC_VER >= 1700
|
||||
# pragma warning(disable:4447) // Disable warning 'main' signature found without threading model
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined WIN32 || defined _WIN32 || defined WINCE
|
||||
#ifndef _WIN32_WINNT // This is needed for the declaration of TryEnterCriticalSection in winbase.h with Visual Studio 2005 (and older?)
|
||||
#define _WIN32_WINNT 0x0400 // http://msdn.microsoft.com/en-us/library/ms686857(VS.85).aspx
|
||||
@@ -423,15 +429,14 @@ String tempfile( const char* suffix )
|
||||
temp_file = temp_dir + std::wstring(L"\\") + temp_file;
|
||||
DeleteFileW(temp_file.c_str());
|
||||
|
||||
size_t asize = wcstombs(NULL, temp_file.c_str(), 0);
|
||||
Ptr<char> aname = new char[asize+1];
|
||||
aname[asize] = 0;
|
||||
wcstombs(aname, temp_file.c_str(), asize);
|
||||
char aname[MAX_PATH];
|
||||
size_t copied = wcstombs(aname, temp_file.c_str(), MAX_PATH);
|
||||
CV_Assert((copied != MAX_PATH) && (copied != (size_t)-1));
|
||||
fname = std::string(aname);
|
||||
RoUninitialize();
|
||||
#else
|
||||
char temp_dir2[MAX_PATH + 1] = { 0 };
|
||||
char temp_file[MAX_PATH + 1] = { 0 };
|
||||
char temp_dir2[MAX_PATH] = { 0 };
|
||||
char temp_file[MAX_PATH] = { 0 };
|
||||
|
||||
if (temp_dir == 0 || temp_dir[0] == 0)
|
||||
{
|
||||
|
@@ -1,7 +1,10 @@
|
||||
#ifdef HAVE_WINRT
|
||||
#pragma warning(disable:4447) // Disable warning 'main' signature found without threading model
|
||||
#ifdef _MSC_VER
|
||||
# if _MSC_VER >= 1700
|
||||
# pragma warning(disable:4447) // Disable warning 'main' signature found without threading model
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
||||
#include "test_precomp.hpp"
|
||||
|
||||
CV_TEST_MAIN("cv")
|
||||
|
Reference in New Issue
Block a user