mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-04 05:09:53 +01:00
Removed const refs from NSString/ NSObject overloads (effectively reapplies PR #855 originally applied to "1.x" master)
This commit is contained in:
parent
059a33d555
commit
e62a9aa444
@ -302,16 +302,16 @@ namespace Catch {
|
|||||||
|
|
||||||
#ifdef __OBJC__
|
#ifdef __OBJC__
|
||||||
template<>
|
template<>
|
||||||
struct StringMaker<NSString const *> {
|
struct StringMaker<NSString*> {
|
||||||
static std::string convert(NSString const* const& nsstring);
|
static std::string convert(NSString* nsstring);
|
||||||
};
|
};
|
||||||
template<>
|
template<>
|
||||||
struct StringMaker<NSString * CATCH_ARC_STRONG> {
|
struct StringMaker<NSString* CATCH_ARC_STRONG> {
|
||||||
static std::string convert(NSString * CATCH_ARC_STRONG const& nsstring);
|
static std::string convert(NSString * CATCH_ARC_STRONG nsstring);
|
||||||
};
|
};
|
||||||
template<>
|
template<>
|
||||||
struct StringMaker<NSObject *> {
|
struct StringMaker<NSObject *> {
|
||||||
static std::string convert(NSObject* const& nsObject);
|
static std::string convert(NSObject* nsObject);
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -210,17 +210,17 @@ std::string StringMaker<double>::convert(double value) {
|
|||||||
|
|
||||||
|
|
||||||
#ifdef __OBJC__
|
#ifdef __OBJC__
|
||||||
std::string StringMaker<NSString const *>::convert(NSString const * const& nsstring) {
|
std::string StringMaker<NSString*>::convert(NSString* nsstring) {
|
||||||
if (!nsstring)
|
if (!nsstring)
|
||||||
return "nil";
|
return "nil";
|
||||||
return "@" + toString([nsstring UTF8String]);
|
return "@" + toString([nsstring UTF8String]);
|
||||||
}
|
}
|
||||||
std::string StringMaker<NSString * CATCH_ARC_STRONG>::convert(NSString * CATCH_ARC_STRONG const& nsstring) {
|
std::string StringMaker<NSString * CATCH_ARC_STRONG>::convert(NSString* CATCH_ARC_STRONG nsstring) {
|
||||||
if (!nsstring)
|
if (!nsstring)
|
||||||
return "nil";
|
return "nil";
|
||||||
return "@" + toString([nsstring UTF8String]);
|
return "@" + toString([nsstring UTF8String]);
|
||||||
}
|
}
|
||||||
std::string StringMaker<NSObject *>::convert(NSObject * const& nsObject) {
|
std::string StringMaker<NSObject*>::convert(NSObject* nsObject) {
|
||||||
return ::Catch::Detail::stringify([nsObject description]);
|
return ::Catch::Detail::stringify([nsObject description]);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user