Skip to content
Snippets Groups Projects
Commit 86fd0262 authored by Jan Trávníček's avatar Jan Trávníček
Browse files

fix moving CharSequence implementation classes

parent f84b79b0
No related branches found
No related tags found
1 merge request!41Fix not working 'aql -q' command.
Pipeline #23739 passed
......@@ -19,6 +19,18 @@ public:
this->linePtr = m_line.c_str ( );
}
 
StringCharSequence ( StringCharSequence && other ) : CharSequenceBase ( std::move ( other ) ) {
size_t dist = this->linePtr - other.m_line.c_str ( );
m_line = std::move ( other.m_line );
this->linePtr = m_line.c_str ( ) + dist;
}
StringCharSequence ( const StringCharSequence & ) = delete;
StringCharSequence & operator = ( StringCharSequence && ) = delete;
StringCharSequence & operator = ( const StringCharSequence & ) = delete;
virtual std::string getLine ( ) const override {
return m_line;
}
......
......@@ -56,6 +56,14 @@ public:
fetch ( true );
}
 
ReadlineCharSequence ( ReadlineCharSequence && ) = default;
ReadlineCharSequence ( const ReadlineCharSequence & ) = delete;
ReadlineCharSequence & operator = ( ReadlineCharSequence && ) = delete;
ReadlineCharSequence & operator = ( const ReadlineCharSequence & ) = delete;
virtual std::string getLine ( ) const override {
std::string res;
for ( const std::string & line : m_lines ) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment