Move #ifdef guards for NAMD_TCL only to context where they are needed 15/4615/1
authorGiacomo Fiorin <giacomo.fiorin@gmail.com>
Tue, 25 Sep 2018 16:40:49 +0000 (12:40 -0400)
committerGiacomo Fiorin <giacomo.fiorin@gmail.com>
Tue, 25 Sep 2018 16:40:49 +0000 (12:40 -0400)
Addresses issue reported by Engelbert Tijskens, Flemish Supercomputer Center

Change-Id: Ia90e60befed388527d802fa275e2f3615d95b262

src/colvarproxy_namd.C

index fce639f..0f2b296 100644 (file)
@@ -479,12 +479,12 @@ void colvarproxy_namd::calculate()
 
 // Callback functions
 
-#ifdef NAMD_TCL
-
 void colvarproxy_namd::init_tcl_pointers()
 {
+#ifdef NAMD_TCL
   // Store pointer to NAMD's Tcl interpreter
   _tcl_interp = reinterpret_cast<void *>(Node::Object()->getScript()->interp);
+#endif
 }
 
 int colvarproxy_namd::run_force_callback()
@@ -508,7 +508,6 @@ int colvarproxy_namd::run_colvar_gradient_callback(
   return colvarproxy::tcl_run_colvar_gradient_callback(name, cvc_values,
                                                        gradient);
 }
-#endif
 
 
 void colvarproxy_namd::add_energy(cvm::real energy)