Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: use string_view instead of string #92

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

aminya
Copy link
Member

@aminya aminya commented Oct 23, 2021

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

@aminya aminya marked this pull request as draft October 23, 2021 04:15
@aminya aminya marked this pull request as ready for review October 23, 2021 05:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant