mirror of
https://github.com/YosysHQ/yosys
synced 2025-06-14 18:06:16 +00:00
Merge pull request #1937 from hzeller/consexpr-opportunity
Use static constexpr instead of static const where possible.
This commit is contained in:
commit
e1f5145afa
2 changed files with 4 additions and 5 deletions
|
@ -35,9 +35,9 @@ public:
|
||||||
static std::string from_file(const std::string &filename);
|
static std::string from_file(const std::string &filename);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static const unsigned int DIGEST_INTS = 5; /* number of 32bit integers per SHA1 digest */
|
static constexpr unsigned int DIGEST_INTS = 5; /* number of 32bit integers per SHA1 digest */
|
||||||
static const unsigned int BLOCK_INTS = 16; /* number of 32bit integers per SHA1 block */
|
static constexpr unsigned int BLOCK_INTS = 16; /* number of 32bit integers per SHA1 block */
|
||||||
static const unsigned int BLOCK_BYTES = BLOCK_INTS * 4;
|
static constexpr unsigned int BLOCK_BYTES = BLOCK_INTS * 4;
|
||||||
|
|
||||||
uint32_t digest[DIGEST_INTS];
|
uint32_t digest[DIGEST_INTS];
|
||||||
std::string buffer;
|
std::string buffer;
|
||||||
|
|
|
@ -316,7 +316,7 @@ class SubCircuit::SolverWorker
|
||||||
|
|
||||||
// helper functions for handling permutations
|
// helper functions for handling permutations
|
||||||
|
|
||||||
static const int maxPermutationsLimit = 1000000;
|
static constexpr int maxPermutationsLimit = 1000000;
|
||||||
|
|
||||||
static int numberOfPermutations(const std::vector<std::string> &list)
|
static int numberOfPermutations(const std::vector<std::string> &list)
|
||||||
{
|
{
|
||||||
|
@ -1689,4 +1689,3 @@ void SubCircuit::Solver::clearConfig()
|
||||||
{
|
{
|
||||||
worker->clearConfig();
|
worker->clearConfig();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue