diff --git a/arbor/profile/profiler.cpp b/arbor/profile/profiler.cpp index be5b2aff19fd53e9b3978d91b2803af2e1047ce9..0a6af0a2278e97ca08848f397dad86fbd89b494a 100644 --- a/arbor/profile/profiler.cpp +++ b/arbor/profile/profiler.cpp @@ -20,8 +20,7 @@ using util::make_span; namespace { // Check whether a string describes a valid profiler region name. bool is_valid_region_string(const std::string& s) { - if (s.size()==0u || s.front()==':' || s.back()==':') return false; - return s.find("__") == s.npos; + return (s.size()!=0u) && (s.front()!=':') && (s.back()!=':'); } //