| 1640 | } |
| 1641 | |
| 1642 | bool validateField(const char* key, bool allowUnderscores) { |
| 1643 | if ((key[0] < 'A' || key[0] > 'Z') && key[0] != '_') { |
| 1644 | return false; |
| 1645 | } |
| 1646 | |
| 1647 | const char* underscore = strchr(key, '_'); |
| 1648 | while (underscore) { |
| 1649 | if (!allowUnderscores || ((underscore[1] < 'A' || underscore[1] > 'Z') && key[0] != '_' && key[0] != '\0')) { |
| 1650 | return false; |
| 1651 | } |
| 1652 | |
| 1653 | underscore = strchr(&underscore[1], '_'); |
| 1654 | } |
| 1655 | |
| 1656 | return true; |
| 1657 | } |
| 1658 | |
| 1659 | void TraceEventFields::validateFormat() const { |
| 1660 | if (g_network && g_network->isSimulated()) { |