MCPcopy Create free account
hub / github.com/SpartanJ/eepp / safeLineOp

Method safeLineOp

src/eepp/ui/doc/textdocument.cpp:2032–2040  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2030}
2031
2032void 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
2042String TextDocument::getLineText( Int64 line ) const {
2043 // eeASSERT( line < (Int64)linesCount() );

Callers 1

getCurrentColumnCountMethod · 0.80

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected