mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-26 05:50:32 +05:00
Remove version.cpp
This commit is contained in:
parent
5a9e913172
commit
835b2703f4
@ -1,4 +1,4 @@
|
||||
add_library(ngcore SHARED archive.cpp version.cpp)
|
||||
add_library(ngcore SHARED archive.cpp)
|
||||
|
||||
target_compile_definitions(ngcore PRIVATE -DNGCORE_EXPORTS)
|
||||
|
||||
|
@ -142,6 +142,18 @@ namespace ngcore
|
||||
virtual Archive & operator & (std::string & str) = 0;
|
||||
virtual Archive & operator & (char *& str) = 0;
|
||||
|
||||
virtual Archive & operator & (VersionInfo & version)
|
||||
{
|
||||
if(Output())
|
||||
(*this) << version.to_string();
|
||||
else
|
||||
{
|
||||
std::string s;
|
||||
(*this) & s;
|
||||
version = VersionInfo(s);
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
// Archive std classes ================================================
|
||||
template<typename T>
|
||||
@ -182,7 +194,7 @@ namespace ngcore
|
||||
}
|
||||
else
|
||||
{
|
||||
size_t size;
|
||||
size_t size = 0;
|
||||
(*this) & size;
|
||||
T1 key; T2 val;
|
||||
for(size_t i = 0; i < size; i++)
|
||||
|
@ -1,11 +0,0 @@
|
||||
|
||||
#include "archive.hpp"
|
||||
#include "version.hpp"
|
||||
|
||||
namespace ngcore
|
||||
{
|
||||
void VersionInfo :: DoArchive(Archive& ar)
|
||||
{
|
||||
ar & mayor_ & minor_ & release & patch & git_hash;
|
||||
}
|
||||
} // namespace ngcore
|
@ -8,7 +8,6 @@
|
||||
|
||||
namespace ngcore
|
||||
{
|
||||
class Archive;
|
||||
class VersionInfo
|
||||
{
|
||||
private:
|
||||
@ -83,8 +82,6 @@ namespace ngcore
|
||||
bool operator >(const VersionInfo& other) const { return other < (*this); }
|
||||
bool operator <=(const VersionInfo& other) const { return !((*this) > other); }
|
||||
bool operator >=(const VersionInfo& other) const { return !((*this) < other); }
|
||||
|
||||
void DoArchive(Archive& ar);
|
||||
};
|
||||
} // namespace ngcore
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user