OSDN Git Service

Remove new compilation error with VS2015
authorGreyMerlin <GreyMerlin7@gmail.com>
Thu, 7 Jun 2018 20:20:25 +0000 (13:20 -0700)
committerGreyMerlin <GreyMerlin7@gmail.com>
Thu, 7 Jun 2018 20:29:04 +0000 (13:29 -0700)
* VS2015 must have tightened up a rule for templates.  This always used
to compile.

* now compiles correctly with both VS2015 and VS2017

Src/MergeDoc.cpp

index 4ea694c..bb5134f 100644 (file)
@@ -2646,7 +2646,7 @@ bool CMergeDoc::OpenDocs(int nFiles, const FileLocation ifileloc[],
                if (syntaxHLEnabled)
                {
                        CCrystalTextView::TextDefinition *enuType = GetView(paneTyped)->GetTextType(sext[paneTyped].c_str());
-                       ForEachView([bTyped, enuType](auto& pView) {
+                       ForEachView([&bTyped, enuType](auto& pView) {
                                if (!bTyped[pView->m_nThisPane])
                                        pView->SetTextType(enuType);
                        });