summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2014-07-08 14:29:05 +0200
committerMichael Stahl <mstahl@redhat.com>2014-07-08 14:31:31 +0200
commit65438659a18698334f22307ccb4d5ed844b637bf (patch)
treea68666d9ffdfc1d64fe8287a8ad004ed13aa7d3b /sw/source
parentae2e7ad276acb9394691a9d4a702ed7a6b07b508 (diff)
sw: work around mysterious MSVC warning C4258
Cleraly the variable "n" from line 999 is not in scope in line 1054 or line 1057? Change-Id: I8ca321e6030390ad0192e4dceb37d87b6f06f0a5
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/core/undo/untbl.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/sw/source/core/undo/untbl.cxx b/sw/source/core/undo/untbl.cxx
index abb253924f3d..bc717389af72 100644
--- a/sw/source/core/undo/untbl.cxx
+++ b/sw/source/core/undo/untbl.cxx
@@ -1051,10 +1051,18 @@ void _SaveTable::CreateNew( SwTable& rTbl, bool bCreateFrms,
}
}
+#ifdef _MSC_VER
+// MSVC 2012 appears very confused and rambles about a declaration of "n" below
+#pragma warning (push, 1)
+#pragma warning (disable: 4258)
+#endif
for( SwTableLines::const_iterator it = rTbl.GetTabLines().begin() + n;
it != rTbl.GetTabLines().begin() + nOldLines; ++it )
delete *it;
rTbl.GetTabLines().erase( rTbl.GetTabLines().begin() + n, rTbl.GetTabLines().begin() + nOldLines );
+#ifdef _MSC_VER
+#pragma warning (pop)
+#endif
}
aParent.GetTabLines().erase( aParent.GetTabLines().begin(), aParent.GetTabLines().begin() + n );