diff --git a/Modules/Core/Metadata/include/otbXMLMetadataSupplier.h b/Modules/Core/Metadata/include/otbXMLMetadataSupplier.h
index bc7a80e864ab531385cd949c30a27f59bf7c4e3c..2b78d3cc96018aaec8173d34ad0a3051b6d4b34b 100644
--- a/Modules/Core/Metadata/include/otbXMLMetadataSupplier.h
+++ b/Modules/Core/Metadata/include/otbXMLMetadataSupplier.h
@@ -78,7 +78,7 @@ public:
    * @return The value corresponding to path.
    * @raises otb::Error if path not found
    */
-  template <typename T> T GetFirstAs(std::string path) const
+  template <typename T> T GetFirstAs(const std::string &path) const
   {
     bool hasValue;
     std::string ret = GetFirstMetadataValue(path, hasValue);