<div dir="ltr">Friendly PING. <div><br></div><div>@klimek </div><div>Hi Manuel, what do you think about the return type for <span style="color:rgb(0,0,0);font-family:Menlo,Consolas,Monaco,monospace;font-size:10px;line-height:16px;white-space:pre-wrap;background-color:rgb(170,255,170)">groupReplacementsByFile?</span></div><div>Daniel suggests that instead of "std::map<std::string, Replacements>"<span style="color:rgb(117,117,117);line-height:1.5">, </span><span style="line-height:1.5">it returns "std::vector<Replacements>". </span></div></div><br><div class="gmail_quote"><div dir="ltr">On Sun, Mar 6, 2016 at 9:32 PM Eric Liu <<a href="mailto:ioeric@google.com">ioeric@google.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">ioeric added inline comments.<br>
<br>
================<br>
Comment at: include/clang/Tooling/Core/Replacement.h:230<br>
@@ +229,3 @@<br>
+<br>
+typedef std::map<const std::string, Replacements><br>
+    FileToReplacementsMap;<br>
----------------<br>
djasper wrote:<br>
> ioeric wrote:<br>
> > djasper wrote:<br>
> > > I think the key type in a map is always const, so no need for "const".<br>
> > I think "const" is needed since the `Entry` passed to map's `[]` operator is of type `const FileEntry *` in `FileToReplaces[Entry].push_back(Replace)`. The code didn't compile without the "const" qualifier.<br>
> Well, now it's a string and the strings are copied anyway. I am pretty sure it will compile after removing "const".<br>
Ooops! I was on another git branch! Yes, it definitely compiles for `string`. Sorry about that.<br>
<br>
<br>
<a href="http://reviews.llvm.org/D17852" rel="noreferrer" target="_blank">http://reviews.llvm.org/D17852</a><br>
<br>
<br>
<br>
</blockquote></div>