General tidying, addressing issues found by static analysis tool.
This commit is contained in:
@@ -20,8 +20,8 @@ namespace Bloom
|
||||
class BiMap
|
||||
{
|
||||
private:
|
||||
std::unordered_map<TypeA, TypeB> map;
|
||||
std::unordered_map<TypeB, typename std::unordered_map<TypeA, TypeB>::iterator> flippedMap;
|
||||
std::unordered_map<TypeA, TypeB> map = {};
|
||||
std::unordered_map<TypeB, typename std::unordered_map<TypeA, TypeB>::iterator> flippedMap = {};
|
||||
|
||||
public:
|
||||
BiMap(std::initializer_list<std::pair<TypeA, TypeB>> elements) {
|
||||
@@ -68,4 +68,4 @@ namespace Bloom
|
||||
return this->map;
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -56,7 +56,7 @@ namespace Bloom
|
||||
}
|
||||
}
|
||||
|
||||
int getFileDescriptor() {
|
||||
int getFileDescriptor() const {
|
||||
return this->fileDescriptor;
|
||||
}
|
||||
|
||||
|
||||
@@ -31,13 +31,12 @@ namespace Bloom
|
||||
* files such as QT stylesheets and UI templates.
|
||||
* @return
|
||||
*/
|
||||
static inline const std::string compiledResourcesPath() {
|
||||
static inline std::string compiledResourcesPath() {
|
||||
#ifdef BLOOM_COMPILED_RESOURCES_PATH_OVERRIDE
|
||||
return std::string(BLOOM_COMPILED_RESOURCES_PATH_OVERRIDE);
|
||||
#else
|
||||
return std::string(":/compiled");
|
||||
#endif
|
||||
}
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
@@ -20,11 +20,11 @@ namespace Bloom
|
||||
private:
|
||||
std::mutex mutex;
|
||||
Type value;
|
||||
|
||||
public:
|
||||
SyncSafe() = default;
|
||||
|
||||
explicit SyncSafe(Type value): value(value) {
|
||||
};
|
||||
explicit SyncSafe(Type value): value(value) {};
|
||||
|
||||
void setValue(Type value) {
|
||||
auto lock = std::unique_lock(this->mutex);
|
||||
@@ -52,4 +52,4 @@ namespace Bloom
|
||||
return std::unique_lock(this->mutex);
|
||||
};
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user