1
0
mirror of synced 2026-02-14 12:14:03 +00:00
Files
YosysHQ.yosys/kernel
Rupert Swarbrick 8f87ccec9b Use c_str(), not str() for IdString/std::string == and != operators
These operators work by fetching the string from the global string
table and then comparing with the std::string that was passed in as
rhs.

Using str() means that we create a std::string (strlen; malloc;
memcpy), compare for equality (another memcmp if they have the same
length) and then finally free the string.

Using c_str() means that we pass the const char* straight to
std::string's equality operator. This ends up as a call to
std::string::compare (the const char* flavour), which is essentially
strcmp.
2020-05-26 12:27:15 +01:00
..
2015-09-01 12:40:36 +02:00
2017-02-23 14:21:02 +01:00
2015-07-02 11:14:30 +02:00
2020-04-30 18:56:25 +00:00
2020-04-30 18:56:25 +00:00
2015-07-02 11:14:30 +02:00
2020-04-30 18:56:25 +00:00
2020-05-08 10:13:39 +02:00