Commit 4577b1a2 authored by Peter Eastman's avatar Peter Eastman
Browse files

The ReferencePlatform was not getting registered automatically.

parent 0b662b49
......@@ -37,11 +37,24 @@
#include "StreamFactory.h"
#include <set>
#include "ReferencePlatform.h"
using namespace OpenMM;
using namespace std;
std::vector<Platform*> Platform::platforms;
static int registerPlatforms() {
// Register the Platforms built into the main library. This should eventually be moved elsewhere.
ReferencePlatform* platform = new ReferencePlatform();
Platform::registerPlatform(platform);
return 0;
}
static int platformInitializer = registerPlatforms();
Platform::~Platform() {
set<KernelFactory*> uniqueKernelFactories;
set<StreamFactory*> uniqueStreamFactories;
......
......@@ -36,14 +36,6 @@
using namespace OpenMM;
ReferencePlatform* registerReferencePlatform() {
ReferencePlatform* platform = new ReferencePlatform();
Platform::registerPlatform(platform);
return platform;
}
ReferencePlatform* staticPlatform = registerReferencePlatform();
ReferencePlatform::ReferencePlatform() {
ReferenceKernelFactory* factory = new ReferenceKernelFactory();
registerKernelFactory(CalcStandardMMForceFieldKernel::Name(), factory);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment