diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2023-09-28 07:42:39 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2023-09-28 07:42:39 +0200 |
commit | bd94fae273b33cc58333c32d21ae5e425372527e (patch) | |
tree | 91424087bc86438e981119da26106fd65aa006c9 | |
parent | b15b51bc57fca8324e20df87c2b68b93bd2ac731 (diff) |
Avoid unnecessary copies
Hopefully this will also get rid of bigus -Wfree-nonheap-object on MinGW GCC
12.
-rw-r--r-- | libxsd-frontend/semantic-graph/elements.hxx | 4 | ||||
-rw-r--r-- | libxsd-frontend/xml.hxx | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/libxsd-frontend/semantic-graph/elements.hxx b/libxsd-frontend/semantic-graph/elements.hxx index 5a0d64b..f025603 100644 --- a/libxsd-frontend/semantic-graph/elements.hxx +++ b/libxsd-frontend/semantic-graph/elements.hxx @@ -193,7 +193,7 @@ namespace XSDFrontend class Names: public virtual Edge { public: - Name + const Name& name () const { return name_; @@ -256,7 +256,7 @@ namespace XSDFrontend return named_ != 0; } - Name + const Name& name () const { assert (named_p ()); diff --git a/libxsd-frontend/xml.hxx b/libxsd-frontend/xml.hxx index df9576a..c608cfa 100644 --- a/libxsd-frontend/xml.hxx +++ b/libxsd-frontend/xml.hxx @@ -203,13 +203,13 @@ namespace XSDFrontend { } - String + const String& name () const { return name_; } - String + const String& namespace_ () const { return namespace__; |