chennqqi / google-url

Automatically exported from code.google.com/p/google-url
Other
0 stars 0 forks source link

Potential API change: StdStringReplacements methods take const STR* rather than const STR& #19

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
StdStringReplacements methods such as SetUsernameStr directly use the .data of 
the passed in const string reference rather than making a copy which the 
StdStringReplacements object owns.

Although this is mentioned in the header comments, it may be safer to change 
the API to take a header so callers don't try to call with string literals. 

Original issue reported on code.google.com by cbentzel@chromium.org on 2 Aug 2010 at 9:31

GoogleCodeExporter commented 8 years ago
I searched through chromium codebase and did not find any callers of 
StdStringReplacements' methods which used string literals, so perhaps this is 
overly paranoid. 

Original comment by cbentzel@chromium.org on 3 Aug 2010 at 2:16