← Back to team overview

millennium-dev team mailing list archive

[Bug 1202670] Re: Redundant code line.

 

According to site

http://www.cplusplus.com/reference/string/string/getline ,

the delimiter (being '\n' in this case) is discarded from the read
string. If I understand it properly, this means no character '\n' can
ever appear on any place of that string, so both std::remove and
std::string::erase will have no effect.

-- 
You received this bug notification because you are a member of
Millennium Developers, which is subscribed to libMillennium.
https://bugs.launchpad.net/bugs/1202670

Title:
  Redundant code line.

Status in libMillennium:
  New

Bug description:
  The line

  "message.erase(std::remove(message.begin(), message.end(), '\n'),
  message.end()); // Removes newline characters"

  in file main.cpp probably does nothing in all cases.

To manage notifications about this bug go to:
https://bugs.launchpad.net/libmillennium/+bug/1202670/+subscriptions


References