--- /dev/null
+
+#ifndef __SGI_HXX
+#define __SGI_HXX
+
+#include <string>
+
+inline bool
+operator!=( const std::string& lhs, const char* rhs)
+{
+ return lhs.compare( rhs ) != 0;
+}
+
+inline bool
+operator!=( const char* lhs, const std::string& rhs)
+{
+ return rhs.compare( lhs ) != 0;
+}
+
+inline bool
+operator==( const std::string& lhs, const char* rhs)
+{
+ return lhs.compare( rhs ) == 0;
+}
+
+inline bool
+operator==( const char* lhs, const std::string& rhs)
+{
+ return rhs.compare( lhs ) == 0;
+}
+
+inline std::string
+operator+(const std::string& lhs, const char* rhs)
+{
+ return lhs + std::string(rhs);
+}
+
+inline std::string
+operator+(const char* lhs, const std::string& rhs)
+{
+ return std::string(lhs) + rhs;
+}
+
+#endif // !__SGI_HXX
ctime \
iomanip \
new \
- streambuf
+ streambuf \
+ \
+ IRIX
#if defined ( sgi ) && !defined( __GNUC__ )
# define SG_HAVE_NATIVE_SGI_COMPILERS
+#include <simgear/compatibility/IRIX>
+
# define SG_EXPLICIT_FUNCTION_TMPL_ARGS
# define SG_CLASS_PARTIAL_SPECIALIZATION
# define SG_NEED_AUTO_PTR
{
is_tcp = true;
}
- else if ( style != (string)"udp" )
+ else if ( style != "udp" )
{
SG_LOG( SG_IO, SG_ALERT,
"Error: SGSocket() unknown style = " << style );
SGTabbedValues tv(string1);
- if (tv[0] != string("Hello")) {
+ if (tv[0] != "Hello") {
cerr << "failed to read string at index 0" << endl;
return 1;
}
- if (tv[1] != string("World")) {
+ if (tv[1] != "World") {
cerr << "failed to read string at index 1" << endl;
return 1;
}
- if (tv[2] != string("34")) {
+ if (tv[2] != "34") {
cerr << "failed to read string at index 2" << endl;
return 1;
}
return 3;
}
- if (tv[5] != string("There Is No Spoon")) {
+ if (tv[5] != "There Is No Spoon") {
cerr << "failed to read string at index 5 (got [" << tv[5] << "]" << endl;
return 1;
}
name = ".";
}
if (i < max && path[i] != '/')
- throw string(string("Illegal character after ") + name);
+ throw string("Illegal character after " + name);
}
else if (isalpha(path[i]) || path[i] == '_') {
{
if (flag == 0)
return defaultState;
- else if (string(flag) == "y")
+ else if (flag == "y")
return true;
- else if (string(flag) == "n")
+ else if (flag == "n")
return false;
else {
string message = "Unrecognized flag value '";
const char * attval;
if (_level == 0) {
- if (string(name) != (string)"PropertyList") {
+ if (name != "PropertyList") {
string message = "Root element name is ";
message += name;
message += "; expected PropertyList";
{
char buf[128];
string out = "";
- if (_path != (string)"") {
+ if (!_path.empty()) {
out += _path;
if (_line != -1 || _column != -1)
out += ",\n";