fix error handling in Camera::getDescription()

This commit is contained in:
2021-06-08 13:47:06 +02:00
parent b7352f53bb
commit cc6bccad08
2 changed files with 29 additions and 12 deletions

View File

@ -39,6 +39,8 @@ public:
class Description
{
private:
size_t hash = 0;
public:
std::string vendor;
std::string serial;
@ -47,7 +49,9 @@ public:
size_t getHash() const
{
return std::hash<std::string>{}(vendor + serial + id + model);
//if(hash == 0)
return /*hash =*/ std::hash<std::string>{}(vendor + serial + id + model);
//return hash;
}
bool operator==(const Description& in) const
@ -83,6 +87,8 @@ private:
ArvStream* aStream_ = nullptr;
ArvCamera* aCamera_ = nullptr;
Description* description = nullptr;
unsigned int width_;
unsigned int height_;
int64_t format = -1;