Always pass the script string around by reference
This commit is contained in:
@@ -1,7 +1,3 @@
|
||||
#include <utility>
|
||||
|
||||
#include <utility>
|
||||
|
||||
|
||||
#ifndef PORYGONLANG_BOUNDEXPRESSION_HPP
|
||||
#define PORYGONLANG_BOUNDEXPRESSION_HPP
|
||||
@@ -37,7 +33,7 @@ class BoundExpression{
|
||||
const unsigned int _length;
|
||||
const shared_ptr<ScriptType> _type;
|
||||
public:
|
||||
BoundExpression(unsigned int start, unsigned int length, shared_ptr<ScriptType> type)
|
||||
BoundExpression(unsigned int start, unsigned int length, shared_ptr<ScriptType> type)
|
||||
: _start(start),
|
||||
_length(length),
|
||||
_type(std::move(type))
|
||||
@@ -47,7 +43,7 @@ public:
|
||||
virtual ~BoundExpression() = default;
|
||||
|
||||
virtual const BoundExpressionKind GetKind() const = 0;
|
||||
virtual const std::shared_ptr<ScriptType> GetType() const{
|
||||
virtual const std::shared_ptr<ScriptType>& GetType() const{
|
||||
return _type;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user