diff --git a/include/etl/string_stream.h b/include/etl/string_stream.h index 7842c157..f5ecdef4 100644 --- a/include/etl/string_stream.h +++ b/include/etl/string_stream.h @@ -60,7 +60,7 @@ namespace etl //************************************************************************* /// Construct from text and format spec. //************************************************************************* - string_stream(etl::istring& text_, etl::format_spec spec_) + string_stream(etl::istring& text_, const etl::format_spec& spec_) : text(text_) , spec(spec_) { @@ -69,7 +69,7 @@ namespace etl //************************************************************************* /// Set the format spec. //************************************************************************* - void set_format(etl::format_spec spec_) + void set_format(const etl::format_spec& spec_) { spec = spec_; } @@ -125,7 +125,7 @@ namespace etl //************************************************************************* /// Stream operators. //************************************************************************* - friend string_stream& operator <<(string_stream& ss, etl::format_spec spec) + friend string_stream& operator <<(string_stream& ss, const etl::format_spec& spec) { ss.spec = spec; return ss; @@ -174,6 +174,9 @@ namespace etl etl::istring& text; etl::format_spec spec; + + string_stream(const string_stream&) ETL_DELETE; + string_stream& operator =(const string_stream&) ETL_DELETE; }; } diff --git a/include/etl/u16string_stream.h b/include/etl/u16string_stream.h index f6251ee3..b0055b51 100644 --- a/include/etl/u16string_stream.h +++ b/include/etl/u16string_stream.h @@ -60,7 +60,7 @@ namespace etl //************************************************************************* /// Construct from text and format spec. //************************************************************************* - u16string_stream(etl::iu16string& text_, etl::u16format_spec spec_) + u16string_stream(etl::iu16string& text_, const etl::u16format_spec& spec_) : text(text_) , spec(spec_) { @@ -69,7 +69,7 @@ namespace etl //************************************************************************* /// Set the format spec. //************************************************************************* - void set_format(etl::u16format_spec spec_) + void set_format(const etl::u16format_spec& spec_) { spec = spec_; } @@ -125,7 +125,7 @@ namespace etl //************************************************************************* /// Stream operators. //************************************************************************* - friend u16string_stream& operator <<(u16string_stream& ss, etl::u16format_spec spec) + friend u16string_stream& operator <<(u16string_stream& ss, const etl::u16format_spec& spec) { ss.spec = spec; return ss; @@ -174,6 +174,9 @@ namespace etl etl::iu16string& text; etl::u16format_spec spec; + + u16string_stream(const u16string_stream&) ETL_DELETE; + u16string_stream& operator =(const u16string_stream&) ETL_DELETE; }; } diff --git a/include/etl/u32string_stream.h b/include/etl/u32string_stream.h index 94044744..5f219e93 100644 --- a/include/etl/u32string_stream.h +++ b/include/etl/u32string_stream.h @@ -60,7 +60,7 @@ namespace etl //************************************************************************* /// Construct from text and format spec. //************************************************************************* - u32string_stream(etl::iu32string& text_, etl::u32format_spec spec_) + u32string_stream(etl::iu32string& text_, const etl::u32format_spec& spec_) : text(text_) , spec(spec_) { @@ -69,7 +69,7 @@ namespace etl //************************************************************************* /// Set the format spec. //************************************************************************* - void set_format(etl::u32format_spec spec_) + void set_format(const etl::u32format_spec& spec_) { spec = spec_; } @@ -125,7 +125,7 @@ namespace etl //************************************************************************* /// Stream operators. //************************************************************************* - friend u32string_stream& operator <<(u32string_stream& ss, etl::u32format_spec spec) + friend u32string_stream& operator <<(u32string_stream& ss, const etl::u32format_spec& spec) { ss.spec = spec; return ss; @@ -174,6 +174,9 @@ namespace etl etl::iu32string& text; etl::u32format_spec spec; + + u32string_stream(const u32string_stream&) ETL_DELETE; + u32string_stream& operator =(const u32string_stream&) ETL_DELETE; }; } diff --git a/include/etl/wstring_stream.h b/include/etl/wstring_stream.h index 9c786da6..e72a9c21 100644 --- a/include/etl/wstring_stream.h +++ b/include/etl/wstring_stream.h @@ -60,7 +60,7 @@ namespace etl //************************************************************************* /// Construct from text and format spec. //************************************************************************* - wstring_stream(etl::iwstring& text_, etl::wformat_spec spec_) + wstring_stream(etl::iwstring& text_, const etl::wformat_spec& spec_) : text(text_) , spec(spec_) { @@ -69,7 +69,7 @@ namespace etl //************************************************************************* /// Set the format spec. //************************************************************************* - void set_format(etl::wformat_spec spec_) + void set_format(const etl::wformat_spec& spec_) { spec = spec_; } @@ -125,7 +125,7 @@ namespace etl //************************************************************************* /// Stream operators. //************************************************************************* - friend wstring_stream& operator <<(wstring_stream& ss, etl::wformat_spec spec) + friend wstring_stream& operator <<(wstring_stream& ss, const etl::wformat_spec& spec) { ss.spec = spec; return ss; @@ -174,6 +174,9 @@ namespace etl etl::iwstring& text; etl::wformat_spec spec; + + wstring_stream(const wstring_stream&) ETL_DELETE; + wstring_stream& operator =(const wstring_stream&) ETL_DELETE; }; }