Commit 2fbc75f4 authored by Maximilien Colange's avatar Maximilien Colange
Browse files

New macro to downcast shared pointers.

* spot/misc/casts.hh: Add a macro down_pointer_cast.
parent 59523924
// -*- coding: utf-8 -*-
// Copyright (C) 2011, 2015 Laboratoire de Recherche et Développement
// Copyright (C) 2011, 2015-2016 Laboratoire de Recherche et Développement
// de l'Epita (LRDE).
//
// This file is part of Spot, a model checking library.
......@@ -29,7 +29,13 @@
// on error, which the assert catches.
#if NDEBUG
# define down_cast static_cast
# define down_cast static_cast
#else
# define down_cast dynamic_cast
#endif
#if NDEBUG
# define down_pointer_cast std::static_pointer_cast
#else
# define down_pointer_cast std::dynamic_pointer_cast
#endif
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