Skip to content

Commit

Permalink
Godot does not like copy operator for string #68
Browse files Browse the repository at this point in the history
  • Loading branch information
Lecrapouille committed Sep 3, 2024
1 parent 610529e commit afc050b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions addons/gdcef/gdcef/src/gdbrowser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class Visitor : public CefStringVisitor

virtual void Visit(const CefString& string) override
{
godot::String html = string.ToString().c_str();
godot::String html(string.ToString().c_str());

m_node.emit_signal("on_html_content_requested", html, &m_node);
}
Expand Down Expand Up @@ -304,7 +304,7 @@ void GDBrowserView::onLoadError(CefRefPtr<CefBrowser> /*browser*/,
{
std::string str = errorText.ToString();
BROWSER_ERROR("has failed loading " << frame->GetURL() << ": " << str);
godot::String err = str.c_str();
godot::String err(str.c_str());
// Emit signal for Godot script
emit_signal("on_page_failed_loading", aborted, err, this);
}
Expand Down

0 comments on commit afc050b

Please sign in to comment.