From: Steinar H. Gunderson Date: Wed, 27 Jul 2016 19:15:25 +0000 (+0200) Subject: Fix int -> unsigned. X-Git-Tag: 0.5~3 X-Git-Url: https://git.sesse.net/?p=bmusb;a=commitdiff_plain;h=8c728daab202458bba567bb4e5c1d0cbe2f8ab9c Fix int -> unsigned. --- diff --git a/bmusb.cpp b/bmusb.cpp index fd323a6..7c21082 100644 --- a/bmusb.cpp +++ b/bmusb.cpp @@ -1011,10 +1011,10 @@ libusb_device_handle *open_card(unsigned card_index, libusb_device *dev, string } // namespace -int BMUSBCapture::num_cards() +unsigned BMUSBCapture::num_cards() { vector found_cards = find_all_cards(); - int ret = found_cards.size(); + unsigned ret = found_cards.size(); for (size_t i = 0; i < found_cards.size(); ++i) { libusb_unref_device(found_cards[i].device); } diff --git a/bmusb/bmusb.h b/bmusb/bmusb.h index 22a6655..f4af6aa 100644 --- a/bmusb/bmusb.h +++ b/bmusb/bmusb.h @@ -177,7 +177,7 @@ class BMUSBCapture : public CaptureInterface { // Note: Cards could be unplugged and replugged between this call and // actually opening the card (in configure_card()). - static int num_cards(); + static unsigned num_cards(); std::map get_available_video_modes() const override; uint32_t get_current_video_mode() const override;