Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 5d9f199

Browse filesBrowse files
committed
Return string css properties as reference
Returning string by value causes read-after-free error.
1 parent 23751c1 commit 5d9f199
Copy full SHA for 5d9f199

File tree

Expand file treeCollapse file tree

1 file changed

+8
-8
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+8
-8
lines changed

‎include/litehtml/css_properties.h

Copy file name to clipboardExpand all lines: include/litehtml/css_properties.h
+8-8Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -225,10 +225,10 @@ namespace litehtml
225225
list_style_position get_list_style_position() const;
226226
void set_list_style_position(list_style_position mListStylePosition);
227227

228-
string get_list_style_image() const;
228+
const string& get_list_style_image() const;
229229
void set_list_style_image(const string& url);
230230

231-
string get_list_style_image_baseurl() const;
231+
const string& get_list_style_image_baseurl() const;
232232
void set_list_style_image_baseurl(const string& url);
233233

234234
const background &get_bg() const;
@@ -249,10 +249,10 @@ namespace litehtml
249249
web_color get_color() const;
250250
void set_color(web_color color);
251251

252-
string get_cursor() const;
252+
const string& get_cursor() const;
253253
void set_cursor(const string& cursor);
254254

255-
string get_content() const;
255+
const string& get_content() const;
256256
void set_content(const string& content);
257257

258258
border_collapse get_border_collapse() const;
@@ -546,10 +546,10 @@ namespace litehtml
546546
m_list_style_position = mListStylePosition;
547547
}
548548

549-
inline string css_properties::get_list_style_image() const { return m_list_style_image; }
549+
inline const string& css_properties::get_list_style_image() const { return m_list_style_image; }
550550
inline void css_properties::set_list_style_image(const string& url) { m_list_style_image = url; }
551551

552-
inline string css_properties::get_list_style_image_baseurl() const { return m_list_style_image_baseurl; }
552+
inline const string& css_properties::get_list_style_image_baseurl() const { return m_list_style_image_baseurl; }
553553
inline void css_properties::set_list_style_image_baseurl(const string& url) { m_list_style_image_baseurl = url; }
554554

555555
inline const background &css_properties::get_bg() const
@@ -605,10 +605,10 @@ namespace litehtml
605605
inline web_color css_properties::get_color() const { return m_color; }
606606
inline void css_properties::set_color(web_color color) { m_color = color; }
607607

608-
inline string css_properties::get_cursor() const { return m_cursor; }
608+
inline const string& css_properties::get_cursor() const { return m_cursor; }
609609
inline void css_properties::set_cursor(const string& cursor) { m_cursor = cursor; }
610610

611-
inline string css_properties::get_content() const { return m_content; }
611+
inline const string& css_properties::get_content() const { return m_content; }
612612
inline void css_properties::set_content(const string& content) { m_content = content; }
613613

614614
inline border_collapse css_properties::get_border_collapse() const

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.