From: Daniel Elstner Date: Sun, 11 Oct 2015 10:35:01 +0000 (+0200) Subject: C++: Make some methods static to match the C API X-Git-Tag: libsigrok-0.4.0~175 X-Git-Url: https://sigrok.org/gitweb/?p=libsigrok.git;a=commitdiff_plain;h=a73d49263611b0d65a3ca1ad85bbee592cf1a234;hp=0ab8e5d22bbb82674a825125c4cb23b8f3b78858 C++: Make some methods static to match the C API Context::package_version() and Context::lib_version() do not access context state and should be static. However, leave the logging related methods alone for now, as making them static would entail making the callback data a global static, since the C API lacks destroy notification callbacks. --- diff --git a/bindings/cxx/include/libsigrokcxx/libsigrokcxx.hpp b/bindings/cxx/include/libsigrokcxx/libsigrokcxx.hpp index 59465066..6fdb153f 100644 --- a/bindings/cxx/include/libsigrokcxx/libsigrokcxx.hpp +++ b/bindings/cxx/include/libsigrokcxx/libsigrokcxx.hpp @@ -261,9 +261,9 @@ public: /** Create new context */ static shared_ptr create(); /** libsigrok package version. */ - string package_version(); + static string package_version(); /** libsigrok library version. */ - string lib_version(); + static string lib_version(); /** Available hardware drivers, indexed by name. */ map > drivers(); /** Available input formats, indexed by name. */