From 43684e9246c8667923f606081398ba92645177ce Mon Sep 17 00:00:00 2001 From: sdottaka Date: Wed, 6 Nov 2013 23:57:57 +0900 Subject: [PATCH] small optimization --HG-- branch : stable --- Src/MergeDoc.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Src/MergeDoc.cpp b/Src/MergeDoc.cpp index 70650691c..d8b8247b3 100644 --- a/Src/MergeDoc.cpp +++ b/Src/MergeDoc.cpp @@ -495,8 +495,7 @@ int CMergeDoc::Rescan(bool &bBinary, IDENTLEVEL &identical, m_diffWrapper.SetCodepage(m_ptBuf[0]->m_encoding.m_unicoding ? CP_UTF8 : m_ptBuf[0]->m_encoding.m_codepage); - std::vector > syncpoints = GetSyncPointList(); - if (syncpoints.size() == 0) + if (!HasSyncPoints()) { // Save text buffer to file for (nBuffer = 0; nBuffer < m_nBuffers; nBuffer++) @@ -510,6 +509,7 @@ int CMergeDoc::Rescan(bool &bBinary, IDENTLEVEL &identical, } else { + const std::vector > syncpoints = GetSyncPointList(); int nStartLine[3] = {0}; int nLines[3], nRealLine[3]; for (int i = 0; i <= syncpoints.size(); ++i) -- 2.11.0