OpenImageIO/oiio — pull request #788 by lgritz (2014-01-19 21:56:51+00:00)
Title: string_ref -- in for a penny, in for a pound

A set of patches that use string_ref in the appropriate places for ParamValue/ParamValueList, ImageSpec::attribute and getattribute, and the ImageCache & TextureSystem attribute/getattribute.

Although it looks intrusive, it actually doesn't change anything about how you use the OIIO APIs. No app-side source code changes should be necessary. It's just that there are a bunch of places where you previously had to be conscious of whether you were passing a char*, a std::string, or a ustring, converting if necessary (or assuming an automatic typecast that may have included an allocation and copy), but now you can use any of these without conversion and without an unnecessary copy or malloc.