Skip to content

Commit

Permalink
Review fix
Browse files Browse the repository at this point in the history
  • Loading branch information
externl committed May 2, 2024
1 parent 438452a commit 5e368df
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions php/src/Properties.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ ZEND_METHOD(Ice_Properties, getProperty)
Ice::PropertiesPtr _this = Wrapper<Ice::PropertiesPtr>::value(getThis());
assert(_this);

string propName(name, nameLen);
string_view propName(name, nameLen);
try
{
string val = _this->getProperty(propName);
Expand All @@ -105,7 +105,7 @@ ZEND_METHOD(Ice_Properties, getIceProperty)
Ice::PropertiesPtr _this = Wrapper<Ice::PropertiesPtr>::value(getThis());
assert(_this);

string propName(name, nameLen);
string_view propName(name, nameLen);
try
{
string val = _this->getIceProperty(propName);
Expand Down Expand Up @@ -138,7 +138,7 @@ ZEND_METHOD(Ice_Properties, getPropertyWithDefault)
Ice::PropertiesPtr _this = Wrapper<Ice::PropertiesPtr>::value(getThis());
assert(_this);

string propName(name, nameLen);
string_view propName(name, nameLen);
string defaultValue;
if (def)
{
Expand Down Expand Up @@ -174,7 +174,7 @@ ZEND_METHOD(Ice_Properties, getPropertyAsInt)
Ice::PropertiesPtr _this = Wrapper<Ice::PropertiesPtr>::value(getThis());
assert(_this);

string propName(name, nameLen);
string_view propName(name, nameLen);
try
{
int32_t val = _this->getPropertyAsInt(propName);
Expand All @@ -200,7 +200,7 @@ ZEND_METHOD(Ice_Properties, getIcePropertyAsInt)
Ice::PropertiesPtr _this = Wrapper<Ice::PropertiesPtr>::value(getThis());
assert(_this);

string propName(name, nameLen);
string_view propName(name, nameLen);
try
{
int32_t val = _this->getIcePropertyAsInt(propName);
Expand Down Expand Up @@ -236,7 +236,7 @@ ZEND_METHOD(Ice_Properties, getPropertyAsIntWithDefault)
Ice::PropertiesPtr _this = Wrapper<Ice::PropertiesPtr>::value(getThis());
assert(_this);

string propName(name, nameLen);
string_view propName(name, nameLen);
try
{
// TODO: Range check
Expand Down Expand Up @@ -267,7 +267,7 @@ ZEND_METHOD(Ice_Properties, getPropertyAsList)
Ice::PropertiesPtr _this = Wrapper<Ice::PropertiesPtr>::value(getThis());
assert(_this);

string propName(name, nameLen);
string_view propName(name, nameLen);
try
{
Ice::StringSeq val = _this->getPropertyAsList(propName);
Expand Down Expand Up @@ -296,7 +296,7 @@ ZEND_METHOD(Ice_Properties, getIcePropertyAsList)
Ice::PropertiesPtr _this = Wrapper<Ice::PropertiesPtr>::value(getThis());
assert(_this);

string propName(name, nameLen);
string_view propName(name, nameLen);
try
{
Ice::StringSeq val = _this->getIcePropertyAsList(propName);
Expand Down Expand Up @@ -335,7 +335,7 @@ ZEND_METHOD(Ice_Properties, getPropertyAsListWithDefault)
Ice::PropertiesPtr _this = Wrapper<Ice::PropertiesPtr>::value(getThis());
assert(_this);

string propName(name, nameLen);
string_view propName(name, nameLen);
Ice::StringSeq defaultValue;
if (def && !extractStringArray(def, defaultValue))
{
Expand Down Expand Up @@ -415,7 +415,7 @@ ZEND_METHOD(Ice_Properties, setProperty)
Ice::PropertiesPtr _this = Wrapper<Ice::PropertiesPtr>::value(getThis());
assert(_this);

string propName(name, nameLen);
string_view propName(name, nameLen);
string propValue;
if (val)
{
Expand Down

0 comments on commit 5e368df

Please sign in to comment.