Fix bug introduced by clang-format reformat.
authorM. Eric Irrgang <ericirrgang@gmail.com>
Fri, 8 Nov 2019 14:55:54 +0000 (17:55 +0300)
committerM. Eric Irrgang <ericirrgang@gmail.com>
Fri, 8 Nov 2019 14:55:54 +0000 (17:55 +0300)
In the post-beta2 application of clang-format, an extra closing brace
was inserted at the end of an assignment of a multi-line lambda. The
extra closing brace prematurely ended an `if` block, causing compiler
errors through the rest of the file. Simply reverting the formatting
of this section of the file does not seem to retrigger the reformatting
error.

Change-Id: I3ae83789337bb60284aeaad15eec36eb99f33708

python_packaging/src/gmxapi/pycontext.cpp

index 4e53b96362a4789e9601f2fc558788295ab1b513..797c7a2c95256967d610fbc0691aba6e8e8be690 100644 (file)
@@ -98,19 +98,18 @@ void PyContext::addMDModule(pybind11::object force_object)
                 // \todo double-check whether there is something we should do to invalidate a PyCapsule.
             }
         };
-    };
-    auto       capsule = py::capsule(holder, gmxapi::MDHolder_Name, deleter);
-    py::object bind    = force_object.attr("bind");
-    // py::capsule does not have bindings and does not implicitly convert to py::object
-    py::object obj = capsule;
-    bind(obj);
-}
-else
-{
-    // Note: Exception behavior is likely to change.
-    // Ref: https://github.com/kassonlab/gmxapi/issues/125
-    throw py::value_error("Argument must provide a `bind` method.");
-}
+        auto       capsule = py::capsule(holder, gmxapi::MDHolder_Name, deleter);
+        py::object bind    = force_object.attr("bind");
+        // py::capsule does not have bindings and does not implicitly convert to py::object
+        py::object obj = capsule;
+        bind(obj);
+    }
+    else
+    {
+        // Note: Exception behavior is likely to change.
+        // Ref: https://github.com/kassonlab/gmxapi/issues/125
+        throw py::value_error("Argument must provide a `bind` method.");
+    }
 } // namespace gmxpy
 
 } // end namespace gmxpy