mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-26 15:26:11 +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__
|
||||
template<>
|
||||
struct StringMaker<NSString const *> {
|
||||
static std::string convert(NSString const* const& nsstring);
|
||||
struct StringMaker<NSString*> {
|
||||
static std::string convert(NSString* nsstring);
|
||||
};
|
||||
template<>
|
||||
struct StringMaker<NSString * CATCH_ARC_STRONG> {
|
||||
static std::string convert(NSString * CATCH_ARC_STRONG const& nsstring);
|
||||
struct StringMaker<NSString* CATCH_ARC_STRONG> {
|
||||
static std::string convert(NSString * CATCH_ARC_STRONG nsstring);
|
||||
};
|
||||
template<>
|
||||
struct StringMaker<NSObject *> {
|
||||
static std::string convert(NSObject* const& nsObject);
|
||||
static std::string convert(NSObject* nsObject);
|
||||
};
|
||||
#endif
|
||||
|
||||
|
@ -210,17 +210,17 @@ std::string StringMaker<double>::convert(double value) {
|
||||
|
||||
|
||||
#ifdef __OBJC__
|
||||
std::string StringMaker<NSString const *>::convert(NSString const * const& nsstring) {
|
||||
std::string StringMaker<NSString*>::convert(NSString* nsstring) {
|
||||
if (!nsstring)
|
||||
return "nil";
|
||||
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)
|
||||
return "nil";
|
||||
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]);
|
||||
}
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user