Consistenty use auto-generated namespace comments.
[pulseview.git] / pv / binding / device.cpp
index 521177ad4bfd3f7fb64a70d9c5f66fd726050aec..3ebc9f9f41839b67d0d6fac1b8cb4d26f7b5ff33 100644 (file)
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+ * along with this program; if not, see <http://www.gnu.org/licenses/>.
  */
 
-#include <stdint.h>
+#include <cstdint>
 
 #include <QDebug>
 
 #include "device.hpp"
 
 #include <pv/prop/bool.hpp>
-#include <pv/prop/double.hpp>
 #include <pv/prop/enum.hpp>
 #include <pv/prop/int.hpp>
 
 #include <libsigrokcxx/libsigrokcxx.hpp>
 
 using boost::optional;
+
 using std::function;
 using std::make_pair;
 using std::pair;
+using std::set;
 using std::shared_ptr;
 using std::string;
 using std::vector;
@@ -45,7 +45,6 @@ using sigrok::ConfigKey;
 using sigrok::Error;
 
 using pv::prop::Bool;
-using pv::prop::Double;
 using pv::prop::Enum;
 using pv::prop::Int;
 using pv::prop::Property;
@@ -144,7 +143,7 @@ void Device::bind_bool(const QString &name,
 }
 
 void Device::bind_enum(const QString &name,
-       const ConfigKey *key, std::set<const Capability *> capabilities,
+       const ConfigKey *key, set<const Capability *> capabilities,
        Property::Getter getter,
        Property::Setter setter, function<QString (Glib::VariantBase)> printer)
 {
@@ -165,7 +164,7 @@ void Device::bind_enum(const QString &name,
 }
 
 void Device::bind_int(const QString &name, QString suffix,
-       optional< std::pair<int64_t, int64_t> > range,
+       optional< pair<int64_t, int64_t> > range,
        Property::Getter getter, Property::Setter setter)
 {
        assert(configurable_);
@@ -178,7 +177,7 @@ QString Device::print_timebase(Glib::VariantBase gvar)
 {
        uint64_t p, q;
        g_variant_get(gvar.gobj(), "(tt)", &p, &q);
-       return QString::fromUtf8(sr_period_string(p * q));
+       return QString::fromUtf8(sr_period_string(p, q));
 }
 
 QString Device::print_vdiv(Glib::VariantBase gvar)
@@ -202,5 +201,5 @@ QString Device::print_probe_factor(Glib::VariantBase gvar)
        return QString("%1x").arg(factor);
 }
 
-} // binding
-} // pv
+}  // namespace binding
+}  // namespace pv