fix forward declarations

This commit is contained in:
Krishna Vedala
2020-07-29 12:46:29 -04:00
parent 7d3adb0023
commit 842c5fb251
3 changed files with 17 additions and 16 deletions

View File

@@ -18,15 +18,10 @@ using std::string;
namespace { // keep the code local to this file by assigning them to an unnamed
// namespace
/** Node object that holds key */
struct Entry {
explicit Entry(int key = notPresent) : key(key) {} ///< constructor
int key; ///< key value
};
// fwd declarations
bool putProber(Entry entry, int key);
bool searchingProber(Entry entry, int key);
using Entry = struct Entry;
bool putProber(const Entry& entry, int key);
bool searchingProber(const Entry& entry, int key);
void add(int key);
// Undocumented globals
@@ -37,6 +32,12 @@ int tomb = -1;
int size;
bool rehashing;
/** Node object that holds key */
struct Entry {
explicit Entry(int key = notPresent) : key(key) {} ///< constructor
int key; ///< key value
};
/**
* @brief Hash a key. Uses the STL library's `std::hash()` function.
*