Apply modernize-pass-by-value.

This commit is contained in:
Alexander Arlt
2020-04-14 10:32:13 -05:00
parent 79a44b8170
commit aac7a1e434
29 changed files with 243 additions and 212 deletions
+3 -2
View File
@@ -55,6 +55,7 @@
#include <cstdint>
#include <string>
#include <tuple>
#include <utility>
namespace solidity::langutil
{
@@ -68,8 +69,8 @@ class CharStream
{
public:
CharStream() = default;
explicit CharStream(std::string const& _source, std::string const& name):
m_source(_source), m_name(name) {}
explicit CharStream(std::string _source, std::string name):
m_source(std::move(_source)), m_name(std::move(name)) {}
int position() const { return m_position; }
bool isPastEndOfInput(size_t _charsForward = 0) const { return (m_position + _charsForward) >= m_source.size(); }