X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=blobdiff_plain;f=ginac%2Fexcompiler.cpp;h=28c24a4ac9a6986631224508706f3d02a10e682f;hp=e108895a0db65b17f1a8f4d7a6939b74ce5878c1;hb=e9350141809e90921b793ef0e5ee2ece71c96fad;hpb=286b0d93528e35957a50c51343e0b4a9bc623bce diff --git a/ginac/excompiler.cpp b/ginac/excompiler.cpp index e108895a..28c24a4a 100644 --- a/ginac/excompiler.cpp +++ b/ginac/excompiler.cpp @@ -6,7 +6,7 @@ */ /* - * GiNaC Copyright (C) 1999-2011 Johannes Gutenberg University Mainz, Germany + * GiNaC Copyright (C) 1999-2015 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 @@ -72,11 +72,11 @@ class excompiler std::vector filelist; /**< List of all opened modules */ public: /** - * Complete clean-up of opend modules is done on destruction. + * Complete clean-up of opened modules is done on destruction. */ ~excompiler() { - for (std::vector::const_iterator it = filelist.begin(); it != filelist.end(); ++it) { + for (auto it = filelist.begin(); it != filelist.end(); ++it) { clean_up(it); } } @@ -153,9 +153,9 @@ public: */ void* link_so_file(const std::string filename, bool clean_up) { - void* module = NULL; + void* module = nullptr; module = dlopen(filename.c_str(), RTLD_NOW); - if (module == NULL) { + if (module == nullptr) { throw std::runtime_error("excompiler::link_so_file: could not open compiled module!"); } @@ -169,7 +169,7 @@ public: */ void unlink(const std::string filename) { - for (std::vector::iterator it = filelist.begin(); it != filelist.end();) { + for (auto it = filelist.begin(); it != filelist.end();) { if (it->name == filename) { clean_up(it); it = filelist.erase(it); @@ -181,7 +181,7 @@ public: }; /** - * This static object manages the modules opened by the complile_ex and link_ex + * This static object manages the modules opened by the compile_ex and link_ex * functions. On program termination its dtor is called and all open modules * are closed. The associated source and so-files are eventually deleted then * as well.