zadeh
zadeh copied to clipboard
feat: use string_view instead of string
Fails because of
CXX(target) Release/obj.target/zadeh/src/binding/node.o
In file included from ../src/binding/node.cc:3:
In file included from ../src/binding/./node.h:7:
In file included from ../src/binding/../zadeh.h:4:
../src/binding/.././common.h:61:10: warning: address of stack memory associated with local variable 'snew' returned [-Wreturn-stack-address]
return snew;
^~~~
../src/binding/.././common.h:67:10: warning: address of stack memory associated with local variable 'snew' returned [-Wreturn-stack-address]
return snew;
^~~~
In file included from ../src/binding/node.cc:3:
In file included from ../src/binding/./node.h:7:
In file included from ../src/binding/../zadeh.h:8:
In file included from ../src/binding/.././matcher.h:9:
../src/binding/../query.h:17:10: warning: address of stack memory associated with parameter 'query' returned [-Wreturn-stack-address]
return query;
^~~~~
In file included from ../src/binding/node.cc:3:
In file included from ../src/binding/./node.h:8:
../src/binding/./node_data_interface.h:23:22: warning: returning address of local temporary object [-Wreturn-stack-address]
return string_view(candidates.Get(ind).ToString().Utf8Value());
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/binding/./node_data_interface.h:82:10: warning: returning address of local temporary object [-Wreturn-stack-address]
return candidates.Get(ind).ToString().Utf8Value();
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5 warnings generated.
SOLINK_MODULE(target) Release/obj.target/zadeh.node
COPY Release/zadeh.node