Commit 996cd648 authored by Milian Wolff's avatar Milian Wolff

Minor optimization: save heap-allocations by pre-allocating data.

parent 8fe93739
......@@ -297,8 +297,8 @@ void KateHighlighting::doHighlight ( const Kate::TextLineData *_prevLine,
return;
const bool firstLine = (_prevLine == 0);
const Kate::TextLine dummy = Kate::TextLine (new Kate::TextLineData ());
const Kate::TextLineData * prevLine = firstLine ? dummy.data() : _prevLine;
static const Kate::TextLineData dummyData;
const Kate::TextLineData * prevLine = firstLine ? &dummyData : _prevLine;
int previousLine = -1;
KateHlContext *context;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment