From d9fdb9a09548ace25c77a21f54244e50ba45bbd5 Mon Sep 17 00:00:00 2001
From: Gabriel Studer <gabriel.studer@unibas.ch>
Date: Fri, 7 May 2021 15:49:43 +0200
Subject: [PATCH] move stuff out of header file

---
 modules/io/src/mol/omf.cc | 10 ++++++++++
 modules/io/src/mol/omf.hh | 11 -----------
 2 files changed, 10 insertions(+), 11 deletions(-)

diff --git a/modules/io/src/mol/omf.cc b/modules/io/src/mol/omf.cc
index d96243bcc..c4eb34949 100644
--- a/modules/io/src/mol/omf.cc
+++ b/modules/io/src/mol/omf.cc
@@ -21,6 +21,16 @@ namespace{
     }
   };
 
+  // define hash function, so we can use ResidueDefinition as key in an unordered 
+  // map. The used hash function is overly simple and gives a hash collision 
+  // whenever we have two residues of same name but different atom composition.
+  // That's hopefully rare...
+  struct ResidueDefinitionHash {
+    std::size_t operator()(const ost::io::ResidueDefinition& r) const {
+      return std::hash<String>()(r.name);
+    }
+  };
+
   // some helpers
   void RealToIntVec(const std::vector<Real>& real_vec, 
                     std::vector<int>& int_vec, Real factor) {
diff --git a/modules/io/src/mol/omf.hh b/modules/io/src/mol/omf.hh
index 721e5f8b0..dfb655514 100644
--- a/modules/io/src/mol/omf.hh
+++ b/modules/io/src/mol/omf.hh
@@ -75,17 +75,6 @@ struct ResidueDefinition {
 };
 
 
-// define hash function, so we can use ResidueDefinition as key in an unordered 
-// map. The used hash function is overly simple and gives a hash collision 
-// whenever we have two residues of same name but different atom composition.
-// That's hopefully rare...
-struct ResidueDefinitionHash {
-  std::size_t operator()(const ResidueDefinition& r) const {
-    return std::hash<String>()(r.name);
-  }
-};
-
-
 struct BioUnitDefinition {
   BioUnitDefinition() { }
 
-- 
GitLab