Make variable const

This commit is contained in:
Andreas Fabri 2016-11-02 16:30:21 +01:00
parent 1c400420ce
commit 73ff40470c
2 changed files with 5 additions and 45 deletions

View File

@ -43,18 +43,14 @@ namespace CGAL {
class IO { class IO {
public: public:
#ifndef CGAL_HEADER_ONLY
CGAL_EXPORT static int mode; static int get_static_mode()
static int& get_static_mode()
{ return IO::mode; }
#else // CGAL_HEADER_ONLY
static int& get_static_mode()
{ {
static int mode = std::ios::xalloc(); static const int mode = std::ios::xalloc();
return mode; return mode;
} }
#endif // CGAL_HEADER_ONLY
enum Mode {ASCII = 0, PRETTY, BINARY}; enum Mode {ASCII = 0, PRETTY, BINARY};
}; };
template <typename Dummy> template <typename Dummy>

View File

@ -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 <CGAL/IO/io.h>
#include <CGAL/IO/io_impl.h>
namespace CGAL {
int IO::mode = std::ios::xalloc();
} //namespace CGAL
#endif