Browse Source

Minor context cleanup

Michael Ragazzon 5 years ago
parent
commit
9189b83c43
2 changed files with 4 additions and 4 deletions
  1. 3 3
      Include/RmlUi/Core/Context.h
  2. 1 1
      Source/Core/Context.cpp

+ 3 - 3
Include/RmlUi/Core/Context.h

@@ -100,10 +100,10 @@ public:
 	/// @return The loaded document, or nullptr if no document was loaded.
 	ElementDocument* LoadDocument(Stream* document_stream);
 	/// Load a document into the context.
-	/// @param[in] string The string containing the document RML.
-	/// @param[in] string Optional string used to name the document - mainly for Log Messages.
+	/// @param[in] document_rml The string containing the document RML.
+	/// @param[in] source_url Optional string used to set the document's source URL, or naming the document for log messages.
 	/// @return The loaded document, or nullptr if no document was loaded.
-	ElementDocument* LoadDocumentFromMemory(const String& string, const String& source_url = "[document from memory]");
+	ElementDocument* LoadDocumentFromMemory(const String& document_rml, const String& source_url = "[document from memory]");
 	/// Unload the given document.
 	/// @param[in] document The document to unload.
 	void UnloadDocument(ElementDocument* document);

+ 1 - 1
Source/Core/Context.cpp

@@ -284,7 +284,7 @@ ElementDocument* Context::LoadDocumentFromMemory(const String& string, const Str
 	// Open the stream based on the string contents.
 	auto stream = MakeUnique<StreamMemory>((byte*)string.c_str(), string.size());
 
-	stream->SetSourceURL( source_url.c_str() );
+	stream->SetSourceURL( source_url );
 
 	// Load the document from the stream.
 	ElementDocument* document = LoadDocument(stream.get());