]> git.mxchange.org Git - simgear.git/commitdiff
sg_netChat: let getTerminator return const char* for compatiblity with FlightGear
authorThomas Geymayer <tomgey@gmail.com>
Sun, 3 Mar 2013 00:19:35 +0000 (01:19 +0100)
committerThomas Geymayer <tomgey@gmail.com>
Sun, 3 Mar 2013 00:19:35 +0000 (01:19 +0100)
simgear/io/sg_netChat.cxx
simgear/io/sg_netChat.hxx

index 0559c09b30d193f4018ab5f173e603503269eedd..d445e4438ad22255febd27e3cda8122e3b694300 100644 (file)
@@ -37,10 +37,10 @@ NetChat::setTerminator(const std::string& t)
   bytesToCollect = -1;
 }
 
-const std::string&
+const char*
 NetChat::getTerminator() const
 {
-  return terminator;
+  return terminator.c_str();
 }
 
 
index bc6ef6569a307df6dd2b5b799bef4cf3f475298d..6b227f8980b28ac9ebfd8eb68f889825e980f4e3 100644 (file)
@@ -79,7 +79,7 @@ public:
   {}
 
   void setTerminator(const std::string& t);
-  const std::string& getTerminator() const;
+  const char* getTerminator() const;
 
   /**
    * set byte count to collect - 'foundTerminator' will be called once