Skip to content

Commit

Permalink
rename variable to avoid shadowing.
Browse files Browse the repository at this point in the history
  • Loading branch information
KineticTheory committed Aug 12, 2021
1 parent f1be5a6 commit cd1470e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/c4/opstream.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ namespace rtt_c4 {
*
* /param[in,out] out ostream buffer to write data into. defaults to std::cout.
*/
void opstream::mpibuf::send(std::ostream &out) {
void opstream::mpibuf::send(std::ostream &myout) {
unsigned const pid = rtt_c4::node();
if (pid == 0) {
buffer_.push_back('\0'); // guarantees that buffer_.size() > 0
out << &buffer_[0];
myout << &buffer_[0];
buffer_.clear();

unsigned const pids = rtt_c4::nodes();
Expand All @@ -36,7 +36,7 @@ void opstream::mpibuf::send(std::ostream &out) {
rtt_c4::receive(&buffer_[0], N, i);
}
buffer_.push_back('\0');
out << &buffer_[0]; // guarantees that buffer_.size() > 0
myout << &buffer_[0]; // guarantees that buffer_.size() > 0
}
} else {

Expand Down
2 changes: 1 addition & 1 deletion src/c4/opstream.hh
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public:
private:
struct mpibuf : public std::streambuf {

void send(std::ostream &out);
void send(std::ostream &myout);
void shrink_to_fit();

int_type overflow(int_type c) override;
Expand Down

0 comments on commit cd1470e

Please sign in to comment.