]> www.ginac.de Git - ginac.git/blobdiff - ginac/archive.cpp
Use C++11 'nullptr' where applicable.
[ginac.git] / ginac / archive.cpp
index 6a973775005435d5ce3617515f6d4557cfac8ae8..27ebfb8970a219349df7d54e4f3eebcc5d34aaed 100644 (file)
@@ -3,7 +3,7 @@
  *  Archiving of GiNaC expressions. */
 
 /*
- *  GiNaC Copyright (C) 1999-2015 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2016 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -267,8 +267,8 @@ std::istream &operator>>(std::istream &is, archive &ar)
        is.get(c1); is.get(c2); is.get(c3); is.get(c4);
        if (c1 != 'G' || c2 != 'A' || c3 != 'R' || c4 != 'C')
                throw (std::runtime_error("not a GiNaC archive (signature not found)"));
-       static const unsigned max_version = GINACLIB_ARCHIVE_VERSION;
-       static const unsigned min_version = GINACLIB_ARCHIVE_VERSION - GINACLIB_ARCHIVE_AGE;
+       constexpr unsigned max_version = GINACLIB_ARCHIVE_VERSION;
+       constexpr unsigned min_version = GINACLIB_ARCHIVE_VERSION - GINACLIB_ARCHIVE_AGE;
        unsigned version = read_unsigned(is);
        if ((version > max_version) || (version < min_version))
                throw (std::runtime_error("archive version " + std::to_string(version) + " cannot be read by this GiNaC library (which supports versions " + std::to_string(min_version) + " thru " + std::to_string(max_version)));
@@ -550,7 +550,7 @@ ex archive_node::unarchive(lst &sym_lst) const
 }
 
 int unarchive_table_t::usecount = 0;
-unarchive_map_t* unarchive_table_t::unarch_map = 0;
+unarchive_map_t* unarchive_table_t::unarch_map = nullptr;
 
 unarchive_table_t::unarchive_table_t()
 {