Portability - Fedora 9

- Using size_t as a result for std::string::find causes a silent error,
  reported only on Ubuntu 8.  size_t is not large enough.  The proper
  result type is std::string::size_type.  This fixes a problem with
  the command "task old" responding with "Ambiguous commane 'old' -
  could be one of oldest, oldest.description, oldest.limit, oldest.sort".
This commit is contained in:
Paul Beckingham 2009-03-15 16:26:20 -04:00
parent 429d0f3071
commit 65f74da7a4

View file

@ -497,7 +497,7 @@ void loadCustomReports (Config& conf)
if (i->substr (0, 7) == "report.")
{
std::string report = i->substr (7, std::string::npos);
size_t columns = report.find (".columns");
std::string::size_type columns = report.find (".columns");
if (columns != std::string::npos)
{
report = report.substr (0, columns);