Removed const refs from NSString/ NSObject overloads (effectively reapplies PR #855 originally applied to "1.x" master)

This commit is contained in:
Phil Nash 2017-06-26 16:48:38 +01:00
parent 059a33d555
commit e62a9aa444
2 changed files with 8 additions and 8 deletions

View File

@ -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

View File

@ -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