mirror of
https://github.com/sqlitebrowser/sqlitebrowser.git
synced 2026-05-19 20:18:23 -05:00
Store contraints in a hash structure instead of a map
Our key type here is a vector of fields and vectors aren't less than comparable by default (and I have no idea how to implement a sane operator<() for them). But because maps require less than comparability, change the map to a hash which only requires an operator==() which a vector should have by default. No idea how this ever worked with a map?! See issue #854.
This commit is contained in:
+2
-2
@@ -9,7 +9,7 @@
|
||||
#include <QVector>
|
||||
#include <QStringList>
|
||||
#include <QPair>
|
||||
#include <QMultiMap>
|
||||
#include <QMultiHash>
|
||||
|
||||
namespace sqlb {
|
||||
|
||||
@@ -155,7 +155,7 @@ private:
|
||||
bool m_unique;
|
||||
};
|
||||
|
||||
typedef QMultiMap<FieldVector, ConstraintPtr> ConstraintMap;
|
||||
typedef QMultiHash<FieldVector, ConstraintPtr> ConstraintMap;
|
||||
|
||||
class Table
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user