0003-FTPParse.cpp-use-std-string.patch 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. From 5fa10ff6b1b60abee172296d9c1dec8dfc10615c Mon Sep 17 00:00:00 2001
  2. From: Stefan Saraev <stefan@saraev.ca>
  3. Date: Sun, 7 May 2017 17:30:47 +0300
  4. Subject: [PATCH] FTPParse.cpp: use std::string
  5. Fixes build with newer gcc versions.
  6. Backported from upstream commit
  7. https://github.com/xbmc/xbmc/commit/5fa10ff6b1b60abee172296d9c1dec8dfc10615c
  8. Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
  9. ---
  10. xbmc/filesystem/FTPParse.cpp | 44 ++++++++++++++++++++++----------------------
  11. 1 file changed, 22 insertions(+), 22 deletions(-)
  12. diff --git a/xbmc/filesystem/FTPParse.cpp b/xbmc/filesystem/FTPParse.cpp
  13. index cfcc7c64ed..b0f676ae1a 100644
  14. --- a/xbmc/filesystem/FTPParse.cpp
  15. +++ b/xbmc/filesystem/FTPParse.cpp
  16. @@ -34,7 +34,7 @@ CFTPParse::CFTPParse()
  17. m_time = 0;
  18. }
  19. -string CFTPParse::getName()
  20. +std::string CFTPParse::getName()
  21. {
  22. return m_name;
  23. }
  24. @@ -59,16 +59,16 @@ time_t CFTPParse::getTime()
  25. return m_time;
  26. }
  27. -void CFTPParse::setTime(string str)
  28. +void CFTPParse::setTime(std::string str)
  29. {
  30. /* Variables used to capture patterns via the regexes */
  31. - string month;
  32. - string day;
  33. - string year;
  34. - string hour;
  35. - string minute;
  36. - string second;
  37. - string am_or_pm;
  38. + std::string month;
  39. + std::string day;
  40. + std::string year;
  41. + std::string hour;
  42. + std::string minute;
  43. + std::string second;
  44. + std::string am_or_pm;
  45. /* time struct used to set the time_t variable */
  46. struct tm time_struct = {};
  47. @@ -338,21 +338,21 @@ int CFTPParse::getDayOfWeek(int month, int date, int year)
  48. return day_of_week;
  49. }
  50. -int CFTPParse::FTPParse(string str)
  51. +int CFTPParse::FTPParse(std::string str)
  52. {
  53. /* Various variable to capture patterns via the regexes */
  54. - string permissions;
  55. - string link_count;
  56. - string owner;
  57. - string group;
  58. - string size;
  59. - string date;
  60. - string name;
  61. - string type;
  62. - string stuff;
  63. - string facts;
  64. - string version;
  65. - string file_id;
  66. + std::string permissions;
  67. + std::string link_count;
  68. + std::string owner;
  69. + std::string group;
  70. + std::string size;
  71. + std::string date;
  72. + std::string name;
  73. + std::string type;
  74. + std::string stuff;
  75. + std::string facts;
  76. + std::string version;
  77. + std::string file_id;
  78. /* Regex for standard Unix listing formats */
  79. pcrecpp::RE unix_re("^([-bcdlps])" // type
  80. --
  81. 2.11.0