@@ -9,11 +9,11 @@ namespace EE { namespace UI { namespace CSS {
99
1010class EE_API StyleSheetPropertiesParser {
1111 public:
12- StyleSheetPropertiesParser ();
12+ StyleSheetPropertiesParser () = default ;
1313
14- explicit StyleSheetPropertiesParser ( const std::string& propsstr );
14+ explicit StyleSheetPropertiesParser ( std::string_view propsstr );
1515
16- void parse ( const std::string& propsstr );
16+ void parse ( std::string_view propsstr );
1717
1818 void print ();
1919
@@ -24,18 +24,18 @@ class EE_API StyleSheetPropertiesParser {
2424 protected:
2525 enum ReadState { ReadingPropertyName, ReadingPropertyValue, ReadingComment };
2626
27- ReadState mPrevRs ;
27+ ReadState mPrevRs { ReadingPropertyName } ;
2828
2929 StyleSheetProperties mProperties ;
3030 StyleSheetVariables mVariables ;
3131
3232 int readPropertyName ( ReadState& rs, std::size_t pos, std::string& buffer,
33- const std::string& str );
33+ std::string_view str );
3434
3535 int readPropertyValue ( ReadState& rs, std::size_t pos, std::string& buffer,
36- const std::string& str );
36+ std::string_view str );
3737
38- int readComment ( ReadState& rs, std::size_t pos, std::string& buffer, const std::string& str );
38+ int readComment ( ReadState& rs, std::size_t pos, std::string& buffer, std::string_view str );
3939
4040 void addProperty ( std::string name, std::string value );
4141};
0 commit comments