Merge remote-tracking branch 'origin/master' into merge-2.4

Conflicts:
	modules/ocl/src/arithm.cpp
This commit is contained in:
Roman Donchenko
2013-11-26 15:32:44 +04:00
12 changed files with 100 additions and 45 deletions

View File

@@ -458,15 +458,8 @@ CV_INLINE int cvIsInf( double value )
# define CV_XADD(addr, delta) (int)__sync_fetch_and_add((unsigned*)(addr), (unsigned)(delta))
# endif
# endif
#elif (defined WIN32 || defined _WIN32 || defined WINCE) && (!defined RC_INVOKED)
# if !defined(_M_AMD64) && !defined(_M_IA64) && !defined(_M_ARM)
CV_EXTERN_C __declspec(dllimport) long __stdcall InterlockedExchangeAdd(long volatile *Addend, long Value);
# define CV_XADD(addr, delta) (int)InterlockedExchangeAdd((long volatile*)addr, delta)
# else
CV_EXTERN_C long _InterlockedExchangeAdd (long volatile *Addend, long Value);
# pragma intrinsic(_InterlockedExchangeAdd)
# define CV_XADD(addr, delta) (int)_InterlockedExchangeAdd((long volatile*)addr, delta)
# endif
#elif defined _MSC_VER && !defined RC_INVOKED
# define CV_XADD(addr, delta) (int)_InterlockedExchangeAdd((long volatile*)addr, delta)
#else
CV_INLINE CV_XADD(int* addr, int delta) { int tmp = *addr; *addr += delta; return tmp; }
#endif

View File

@@ -364,6 +364,10 @@ public:
String& operator=(const char* s);
String& operator=(char c);
String& operator+=(const String& str);
String& operator+=(const char* s);
String& operator+=(char c);
size_t size() const;
size_t length() const;
@@ -416,6 +420,7 @@ public:
String(const std::string& str);
String(const std::string& str, size_t pos, size_t len = npos);
String& operator=(const std::string& str);
String& operator+=(const std::string& str);
operator std::string() const;
friend String operator+ (const String& lhs, const std::string& rhs);
@@ -544,6 +549,27 @@ String& String::operator=(char c)
return *this;
}
inline
String& String::operator+=(const String& str)
{
*this = *this + str;
return *this;
}
inline
String& String::operator+=(const char* s)
{
*this = *this + s;
return *this;
}
inline
String& String::operator+=(char c)
{
*this = *this + c;
return *this;
}
inline
size_t String::size() const
{

View File

@@ -103,6 +103,13 @@ String& String::operator = (const std::string& str)
return *this;
}
inline
String& String::operator += (const std::string& str)
{
*this = *this + str;
return *this;
}
inline
String::operator std::string() const
{