Commit aa457a20 authored by Alexandre Duret-Lutz's avatar Alexandre Duret-Lutz

tmpfile: remove deprecated throw specifiers

* spot/misc/tmpfile.cc, spot/misc/tmpfile.hh: Remove throw specifier
to suppress a deprecation warning from g++ 7.
parent 4eebe94a
// -*- coding: utf-8 -*-
// Copyright (C) 2013, 2015 Laboratoire de Recherche et Développement
// de l'Epita (LRDE).
// Copyright (C) 2013, 2015, 2017 Laboratoire de Recherche et
// Développement de l'Epita (LRDE).
//
// This file is part of Spot, a model checking library.
//
......@@ -43,7 +43,6 @@ namespace spot
create_temporary_file(const char* prefix,
const char* suffix,
char** name)
throw(std::bad_alloc, std::runtime_error)
{
static const char* tmpdir = get_tmpdir();
static int tmpdirlen = tmpdir ? strlen(tmpdir) : 0;
......@@ -116,7 +115,6 @@ namespace spot
temporary_file*
create_tmpfile(const char* prefix, const char* suffix)
throw(std::bad_alloc, std::runtime_error)
{
char* name;
int fd = create_temporary_file(prefix, suffix, &name);
......@@ -129,7 +127,6 @@ namespace spot
open_temporary_file*
create_open_tmpfile(const char* prefix, const char* suffix)
throw(std::bad_alloc, std::runtime_error)
{
char* name;
int fd = create_temporary_file(prefix, suffix, &name);
......
// -*- coding: utf-8 -*-
// Copyright (C) 2013, 2015 Laboratoire de Recherche et Développement
// de l'Epita (LRDE).
// Copyright (C) 2013, 2015, 2017 Laboratoire de Recherche et
// Développement de l'Epita (LRDE).
//
// This file is part of Spot, a model checking library.
//
......@@ -112,16 +112,14 @@ namespace spot
/// The temporary file is created and left empty. If you need
/// to fill it, consider using create_open_tmpfile() instead.
SPOT_API temporary_file*
create_tmpfile(const char* prefix, const char* suffix = nullptr)
throw(std::bad_alloc, std::runtime_error);
create_tmpfile(const char* prefix, const char* suffix = nullptr);
/// \brief Create a temporary file and leave it open for writing.
///
/// Same as create_tmpfile, be leave the file open for writing. The
/// open_temporary_file::fd() method returns the file descriptor.
SPOT_API open_temporary_file*
create_open_tmpfile(const char* prefix, const char* suffix = nullptr)
throw(std::bad_alloc, std::runtime_error);
create_open_tmpfile(const char* prefix, const char* suffix = nullptr);
/// \brief Delete all temporary files.
///
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment