| 2030 | } |
| 2031 | |
| 2032 | void TextDocument::safeLineOp( Int64 line, std::function<void( TextDocumentLine& )> op ) { |
| 2033 | Lock l( mLinesMutex ); |
| 2034 | static TextDocumentLine safeLine = TextDocumentLine( "", nullptr ); |
| 2035 | if ( line >= 0 && line < (Int64)mLines.size() ) { |
| 2036 | op( mLines[line] ); |
| 2037 | } else { |
| 2038 | op( safeLine ); |
| 2039 | } |
| 2040 | } |
| 2041 | |
| 2042 | String TextDocument::getLineText( Int64 line ) const { |
| 2043 | // eeASSERT( line < (Int64)linesCount() ); |
no test coverage detected