From 73ff40470cbdcee4d494a1ede4ed5302f7874acf Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Wed, 2 Nov 2016 16:30:21 +0100 Subject: [PATCH] Make variable const --- Stream_support/include/CGAL/IO/io.h | 14 ++++------- Stream_support/src/CGAL/io.cpp | 36 ----------------------------- 2 files changed, 5 insertions(+), 45 deletions(-) delete mode 100644 Stream_support/src/CGAL/io.cpp diff --git a/Stream_support/include/CGAL/IO/io.h b/Stream_support/include/CGAL/IO/io.h index 8c6dfa9e81f..d83d4ee5c96 100644 --- a/Stream_support/include/CGAL/IO/io.h +++ b/Stream_support/include/CGAL/IO/io.h @@ -43,18 +43,14 @@ namespace CGAL { class IO { public: -#ifndef CGAL_HEADER_ONLY - CGAL_EXPORT static int mode; - static int& get_static_mode() - { return IO::mode; } -#else // CGAL_HEADER_ONLY - static int& get_static_mode() + + static int get_static_mode() { - static int mode = std::ios::xalloc(); + static const int mode = std::ios::xalloc(); return mode; } -#endif // CGAL_HEADER_ONLY - enum Mode {ASCII = 0, PRETTY, BINARY}; + + enum Mode {ASCII = 0, PRETTY, BINARY}; }; template diff --git a/Stream_support/src/CGAL/io.cpp b/Stream_support/src/CGAL/io.cpp deleted file mode 100644 index 6514769ace3..00000000000 --- a/Stream_support/src/CGAL/io.cpp +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) 1997 -// Utrecht University (The Netherlands), -// ETH Zurich (Switzerland), -// INRIA Sophia-Antipolis (France), -// Max-Planck-Institute Saarbruecken (Germany), -// and Tel-Aviv University (Israel). All rights reserved. -// -// This file is part of CGAL (www.cgal.org); you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public License as -// published by the Free Software Foundation; either version 3 of the License, -// or (at your option) any later version. -// -// Licensees holding a valid commercial license may use this file in -// accordance with the commercial license agreement provided with the software. -// -// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -// -// $URL$ -// $Id$ -// -// -// Author(s) : Andreas Fabri - -#ifndef CGAL_HEADER_ONLY - -#include -#include - -namespace CGAL { - -int IO::mode = std::ios::xalloc(); - -} //namespace CGAL - -#endif