Fix cfg for std::xstream::write() (#4778)

This commit is contained in:
chrchr-github 2023-02-08 08:59:13 +01:00 committed by GitHub
parent 271ccbc8f3
commit 0dddba3bd6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 4 deletions

View File

@ -6539,7 +6539,7 @@ The obsolete function 'gets' is called. With 'gets' you'll get a buffer overrun
</arg>
<arg nr="2" direction="in">
<not-uninit/>
<valid>1:</valid>
<valid>0:</valid>
</arg>
</function>
<!--std::ostringstream& std::ostringstream::write (const char* s, streamsize n);-->
@ -6554,7 +6554,7 @@ The obsolete function 'gets' is called. With 'gets' you'll get a buffer overrun
</arg>
<arg nr="2" direction="in">
<not-uninit/>
<valid>1:</valid>
<valid>0:</valid>
</arg>
</function>
<!--std::ostream& std::ostream::write (const char* s, streamsize n);-->
@ -6569,7 +6569,7 @@ The obsolete function 'gets' is called. With 'gets' you'll get a buffer overrun
</arg>
<arg nr="2" direction="in">
<not-uninit/>
<valid>1:</valid>
<valid>0:</valid>
</arg>
</function>
<!--std::fstream& std::fstream::write (const char* s, streamsize n);-->
@ -6584,7 +6584,7 @@ The obsolete function 'gets' is called. With 'gets' you'll get a buffer overrun
</arg>
<arg nr="2" direction="in">
<not-uninit/>
<valid>1:</valid>
<valid>0:</valid>
</arg>
</function>
<!-- void std::vector::assign( size_type count, const T& value ); -->

View File

@ -4458,6 +4458,11 @@ void getline()
in.close();
}
void stream_write(std::ofstream& s, std::vector<char> v) {
if (v.empty()) {}
s.write(v.data(), v.size());
}
void stdstring()
{
std::string s;