diff options
author | Miodrag Milanovic <mmicko@gmail.com> | 2019-06-25 18:19:25 +0200 |
---|---|---|
committer | Miodrag Milanovic <mmicko@gmail.com> | 2019-06-25 18:19:25 +0200 |
commit | be47fc3e9a81a4890b05223ae18803cb07674dc9 (patch) | |
tree | b0690ae9c7fd1c06db96ab036c3e177d50f6961d /common/nextpnr.h | |
parent | ec47ce2320fdc9d698e71c07af0844f7ecc2445c (diff) | |
download | nextpnr-be47fc3e9a81a4890b05223ae18803cb07674dc9.tar.gz nextpnr-be47fc3e9a81a4890b05223ae18803cb07674dc9.tar.bz2 nextpnr-be47fc3e9a81a4890b05223ae18803cb07674dc9.zip |
clangformat run
Diffstat (limited to 'common/nextpnr.h')
-rw-r--r-- | common/nextpnr.h | 37 |
1 files changed, 20 insertions, 17 deletions
diff --git a/common/nextpnr.h b/common/nextpnr.h index 6950ac76..3f434580 100644 --- a/common/nextpnr.h +++ b/common/nextpnr.h @@ -290,7 +290,7 @@ struct PipMap struct Property { bool is_string; - + std::string str; int num; @@ -299,22 +299,25 @@ struct Property bool isString() const { return is_string; } - void setNumber(int val) { is_string = false; num = val; str = std::to_string(val); } - void setString(std::string val) { is_string = true; str = val; } - - const char * c_str() const { return str.c_str(); } - operator std::string () const { return str; } - - bool operator==(const std::string other) const + void setNumber(int val) { - return str == other; - } - bool operator!=(const std::string other) const + is_string = false; + num = val; + str = std::to_string(val); + } + void setString(std::string val) { - return str != other; - } + is_string = true; + str = val; + } + + const char *c_str() const { return str.c_str(); } + operator std::string() const { return str; } + + bool operator==(const std::string other) const { return str == other; } + bool operator!=(const std::string other) const { return str != other; } - Property& operator=(std::string other) + Property &operator=(std::string other) { is_string = true; str = other; @@ -732,10 +735,10 @@ struct Context : Arch, DeterministicRNG return boost::lexical_cast<T>(settings.find(new_id)->second.str); else settings[id(name)] = std::to_string(defaultValue); - - return defaultValue; + + return defaultValue; } - + template <typename T> T setting(const char *name) const { IdString new_id = id(name); |