Minor clangformat changes

Signed-off-by: Clifford Wolf <clifford@clifford.at>
This commit is contained in:
Clifford Wolf 2018-06-12 15:52:38 +02:00
parent 136ce3d18f
commit da33da5bc2
2 changed files with 7 additions and 4 deletions

View File

@ -22,12 +22,12 @@
NEXTPNR_NAMESPACE_BEGIN
std::unordered_map<std::string, int> *IdString::database_str_to_idx = nullptr;
std::vector<const std::string*> *IdString::database_idx_to_str = nullptr;
std::vector<const std::string *> *IdString::database_idx_to_str = nullptr;
void IdString::initialize()
{
database_str_to_idx = new std::unordered_map<std::string, int>;
database_idx_to_str = new std::vector<const std::string*>;
database_idx_to_str = new std::vector<const std::string *>;
initialize_add("", 0);
initialize_chip();
}

View File

@ -46,7 +46,7 @@ struct IdString
int index = 0;
static std::unordered_map<std::string, int> *database_str_to_idx;
static std::vector<const std::string*> *database_idx_to_str;
static std::vector<const std::string *> *database_idx_to_str;
static void initialize();
static void initialize_chip();
@ -91,7 +91,10 @@ struct IdString
operator const std::string &() const { return str(); }
bool operator<(const IdString &other) const { return index < other.index; }
bool operator==(const IdString &other) const { return index == other.index; }
bool operator==(const IdString &other) const
{
return index == other.index;
}
bool operator==(const std::string &s) const { return str() == s; }
bool operator==(const char *s) const { return str() == s; }