diff options
author | Cary Clark <caryclark@skia.org> | 2018-07-12 16:24:53 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-07-12 23:47:49 +0000 |
commit | ab5c9af442382fd05215a09f1814686710108880 (patch) | |
tree | 4ae24dee1da7e80095da3c300db5f36b36150932 /tools/bookmaker/includeWriter.cpp | |
parent | f839361feabc22a97108140e2f665cd4c947141a (diff) |
fix include generation
Over zealous requirement to have periods at end
of every sentence relaxed. Removed ancient comments
from SkRRect.h. Add support for understanding " = default".
TBR=caryclark@google.com
Docs-Preview: https://skia.org/?cl=141120
Bug: skia:6818
Change-Id: I184533539803238ed386863f9029cb68a27e1d6a
Reviewed-on: https://skia-review.googlesource.com/141120
Commit-Queue: Cary Clark <caryclark@skia.org>
Reviewed-by: Cary Clark <caryclark@skia.org>
Diffstat (limited to 'tools/bookmaker/includeWriter.cpp')
-rw-r--r-- | tools/bookmaker/includeWriter.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/tools/bookmaker/includeWriter.cpp b/tools/bookmaker/includeWriter.cpp index e16da320eb..922f2200a9 100644 --- a/tools/bookmaker/includeWriter.cpp +++ b/tools/bookmaker/includeWriter.cpp @@ -436,6 +436,9 @@ void IncludeWriter::enumHeaderOut(RootDefinition* root, const Definition& child) enumDef = &mapEntry->second; } } + if (!enumDef && enumName == root->fName) { + enumDef = root; + } SkASSERT(enumDef); // child[0] should be #Code comment starts at child[0].fTerminator // though skip until #Code is found (in case there's a #ToDo, etc) @@ -1464,7 +1467,13 @@ bool IncludeWriter::populate(Definition* def, ParentPair* prevPair, RootDefiniti while (continueEnd > fContinuation && isspace(continueEnd[-1])) { --continueEnd; } - methodName += string(fContinuation, continueEnd - fContinuation); + const char defaultTag[] = " = default"; + size_t tagSize = sizeof(defaultTag) - 1; + const char* tokenEnd = continueEnd - tagSize; + if (tokenEnd <= fContinuation || strncmp(tokenEnd, defaultTag, tagSize)) { + tokenEnd = continueEnd; + } + methodName += string(fContinuation, tokenEnd - fContinuation); if (string::npos != methodName.find('\n')) { methodName.erase(std::remove(methodName.begin(), methodName.end(), '\n'), methodName.end()); |