summaryrefslogtreecommitdiffstats
path: root/formula
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-01-28 17:53:30 +0100
committerStephan Bergmann <sbergman@redhat.com>2015-01-28 17:56:18 +0100
commitcead54b6e555fe907348943b4586e956771f6ad0 (patch)
tree509e515c969fa27449fd7f7674c252e742133aae /formula
parentexternal/lcms2: Work around -fsanitize=alignment (diff)
downloadcore-cead54b6e555fe907348943b4586e956771f6ad0.tar.gz
core-cead54b6e555fe907348943b4586e956771f6ad0.zip
Use vector::data
...in some places where it is obvious that it does not hurt that for an empty vector the obtained pointer is not necessarily a nullptr. Change-Id: Id5d66b1559ca8b8955d379bcdbfae6986ef46a51
Diffstat (limited to 'formula')
-rw-r--r--formula/source/core/api/FormulaCompiler.cxx3
1 files changed, 1 insertions, 2 deletions
diff --git a/formula/source/core/api/FormulaCompiler.cxx b/formula/source/core/api/FormulaCompiler.cxx
index 01095876702c..acfdc09467be 100644
--- a/formula/source/core/api/FormulaCompiler.cxx
+++ b/formula/source/core/api/FormulaCompiler.cxx
@@ -502,8 +502,7 @@ uno::Sequence< sheet::FormulaOpCodeMapEntry > FormulaCompiler::OpCodeMap::create
}
}
}
- const FormulaOpCodeMapEntry* pRet = aVec.empty() ? 0 : &aVec[0];
- return uno::Sequence< FormulaOpCodeMapEntry >( pRet, aVec.size());
+ return uno::Sequence< FormulaOpCodeMapEntry >(aVec.data(), aVec.size());
}