mirror of
https://github.com/verilator/verilator.git
synced 2026-10-06 01:54:01 +02:00
Add MISINDENT lint warning for misleading indentation.
This commit is contained in:
@@ -158,6 +158,15 @@ bool VString::isWhitespace(const string& str) {
|
||||
return true;
|
||||
}
|
||||
|
||||
string::size_type VString::leadingWhitespaceCount(const string& str) {
|
||||
string::size_type result = 0;
|
||||
for (const char c : str) {
|
||||
++result;
|
||||
if (!std::isspace(c)) break;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
double VString::parseDouble(const string& str, bool* successp) {
|
||||
char* const strgp = new char[str.size() + 1];
|
||||
char* dp = strgp;
|
||||
|
||||
Reference in New Issue
Block a user