diff options
author | lloyd <[email protected]> | 2007-07-23 15:44:04 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2007-07-23 15:44:04 +0000 |
commit | e2f1f734277146d817ab284dea21e4013cb5b937 (patch) | |
tree | 21ad6ee775e36aa7fb24a504077200c22b1f15b8 /src/pipe_rw.cpp | |
parent | 211c4929ae92106794984d872a0cae1a873baa29 (diff) |
Avoid C-style casts (as detected by GCC's -Wold-style-cast) and instead use
static_cast or reinterpret_cast, as needed.
Diffstat (limited to 'src/pipe_rw.cpp')
-rw-r--r-- | src/pipe_rw.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pipe_rw.cpp b/src/pipe_rw.cpp index 7a7e672fb..1fa195210 100644 --- a/src/pipe_rw.cpp +++ b/src/pipe_rw.cpp @@ -48,7 +48,7 @@ void Pipe::write(const MemoryRegion<byte>& input) *************************************************/ void Pipe::write(const std::string& str) { - write((const byte*)str.data(), str.size()); + write(reinterpret_cast<const byte*>(str.data()), str.size()); } /************************************************* @@ -122,7 +122,7 @@ std::string Pipe::read_all_as_string(u32bit msg) u32bit got = read(buffer, buffer.size(), msg); if(got == 0) break; - str.append((const char*)buffer.begin(), got); + str.append(reinterpret_cast<const char*>(buffer.begin()), got); } return str; |