diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-10-29 09:44:32 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-10-29 10:40:09 +0000 |
commit | 54ba9587c0f1d3b5206742339af4907047fb4748 (patch) | |
tree | 3526b06449a74b5bca07aa4cdb141abc8f535c5b /include/o3tl | |
parent | b7e999e2e9df272e8542c6a32486b2cc1a058f15 (diff) |
coverity#1202781 Division or modulo by zero
Change-Id: I2908c57badd079c8f19c679f40ed815ce2cba374
Diffstat (limited to 'include/o3tl')
-rw-r--r-- | include/o3tl/numeric.hxx | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/include/o3tl/numeric.hxx b/include/o3tl/numeric.hxx new file mode 100644 index 000000000000..09f67f53d5d3 --- /dev/null +++ b/include/o3tl/numeric.hxx @@ -0,0 +1,28 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#ifndef INCLUDED_O3TL_NUMERIC_HXX +#define INCLUDED_O3TL_NUMERIC_HXX + +#include <stdexcept> + +namespace o3tl +{ + struct divide_by_zero : public std::runtime_error + { + explicit divide_by_zero() + : std::runtime_error("divide by zero") + { + } + }; +} + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |