From 5e368df50ade534481b843cbbee574342afa57b5 Mon Sep 17 00:00:00 2001 From: Joe George Date: Thu, 2 May 2024 12:11:53 -0400 Subject: [PATCH] Review fix --- php/src/Properties.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/php/src/Properties.cpp b/php/src/Properties.cpp index b6660546216..91d6f9d9069 100644 --- a/php/src/Properties.cpp +++ b/php/src/Properties.cpp @@ -79,7 +79,7 @@ ZEND_METHOD(Ice_Properties, getProperty) Ice::PropertiesPtr _this = Wrapper::value(getThis()); assert(_this); - string propName(name, nameLen); + string_view propName(name, nameLen); try { string val = _this->getProperty(propName); @@ -105,7 +105,7 @@ ZEND_METHOD(Ice_Properties, getIceProperty) Ice::PropertiesPtr _this = Wrapper::value(getThis()); assert(_this); - string propName(name, nameLen); + string_view propName(name, nameLen); try { string val = _this->getIceProperty(propName); @@ -138,7 +138,7 @@ ZEND_METHOD(Ice_Properties, getPropertyWithDefault) Ice::PropertiesPtr _this = Wrapper::value(getThis()); assert(_this); - string propName(name, nameLen); + string_view propName(name, nameLen); string defaultValue; if (def) { @@ -174,7 +174,7 @@ ZEND_METHOD(Ice_Properties, getPropertyAsInt) Ice::PropertiesPtr _this = Wrapper::value(getThis()); assert(_this); - string propName(name, nameLen); + string_view propName(name, nameLen); try { int32_t val = _this->getPropertyAsInt(propName); @@ -200,7 +200,7 @@ ZEND_METHOD(Ice_Properties, getIcePropertyAsInt) Ice::PropertiesPtr _this = Wrapper::value(getThis()); assert(_this); - string propName(name, nameLen); + string_view propName(name, nameLen); try { int32_t val = _this->getIcePropertyAsInt(propName); @@ -236,7 +236,7 @@ ZEND_METHOD(Ice_Properties, getPropertyAsIntWithDefault) Ice::PropertiesPtr _this = Wrapper::value(getThis()); assert(_this); - string propName(name, nameLen); + string_view propName(name, nameLen); try { // TODO: Range check @@ -267,7 +267,7 @@ ZEND_METHOD(Ice_Properties, getPropertyAsList) Ice::PropertiesPtr _this = Wrapper::value(getThis()); assert(_this); - string propName(name, nameLen); + string_view propName(name, nameLen); try { Ice::StringSeq val = _this->getPropertyAsList(propName); @@ -296,7 +296,7 @@ ZEND_METHOD(Ice_Properties, getIcePropertyAsList) Ice::PropertiesPtr _this = Wrapper::value(getThis()); assert(_this); - string propName(name, nameLen); + string_view propName(name, nameLen); try { Ice::StringSeq val = _this->getIcePropertyAsList(propName); @@ -335,7 +335,7 @@ ZEND_METHOD(Ice_Properties, getPropertyAsListWithDefault) Ice::PropertiesPtr _this = Wrapper::value(getThis()); assert(_this); - string propName(name, nameLen); + string_view propName(name, nameLen); Ice::StringSeq defaultValue; if (def && !extractStringArray(def, defaultValue)) { @@ -415,7 +415,7 @@ ZEND_METHOD(Ice_Properties, setProperty) Ice::PropertiesPtr _this = Wrapper::value(getThis()); assert(_this); - string propName(name, nameLen); + string_view propName(name, nameLen); string propValue; if (val) {