Skip to content

Commit

Permalink
Fix move ctor for database and accidental delete
Browse files Browse the repository at this point in the history
  • Loading branch information
msm-code committed Dec 24, 2022
1 parent 1462971 commit 6fe18ec
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions libursa/OnDiskDataset.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ class NgramProfile {
NgramProfile() : profiles() {}
NgramProfile(std::map<IndexType, std::vector<uint64_t>> &&profiles)
: profiles(std::move(profiles)) {}
NgramProfile &operator=(NgramProfile &&other) = default;
NgramProfile(NgramProfile &&other) = default;
NgramProfile(const NgramProfile &other) = delete;

// Returns the size in bytes of data for a given ngram.
Expand Down
4 changes: 4 additions & 0 deletions libursa/Query.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ class PrimitiveQuery {

IndexType itype;
TriGram trigram;

// We want to use PrimitiveQuery in STL containers, and this means they
// must be comparable using <. Specific order doesn't matter.
bool operator<(const PrimitiveQuery &rhs) const;
};

using QueryPrimitive =
Expand Down

0 comments on commit 6fe18ec

Please sign in to comment.