# include <windows.h>
#endif
+#include <string.h> // for strcmp()
+
#include <simgear/compiler.h>
#include <simgear/misc/exception.hxx>
t->table = new SGInterpTable();
for(int i = 0; i < trans_table->nChildren(); i++) {
const SGPropertyNode * node = trans_table->getChild(i);
- if (string(node->getName()) == "entry") {
+ if (!strcmp(node->getName(), "entry")) {
double ind = node->getDoubleValue("ind", 0.0);
double dep = node->getDoubleValue("dep", 0.0);
SG_LOG( SG_COCKPIT, SG_INFO, "Adding interpolation entry "
for (int i = 0; i < node->nChildren(); i++) {
const SGPropertyNode * child = node->getChild(i);
cerr << "Trying child " << child->getName() << endl;
- if (string(child->getName()) == "layer") {
+ if (!strcmp(child->getName(), "layer")) {
cerr << "succeeded!" << endl;
((FGGroupLayer *)layer)->addLayer(readLayer(child, w_scale, h_scale));
}
int nChunks = chunk_group->nChildren();
for (int i = 0; i < nChunks; i++) {
const SGPropertyNode * node = chunk_group->getChild(i);
- if (string(node->getName()) == "chunk") {
+ if (!strcmp(node->getName(), "chunk")) {
FGTextLayer::Chunk * chunk = readTextChunk(node);
if (chunk != 0)
tlayer->addChunk(chunk);
int nTransformations = trans_group->nChildren();
for (int i = 0; i < nTransformations; i++) {
const SGPropertyNode * node = trans_group->getChild(i);
- if (string(node->getName()) == "transformation") {
+ if (!strcmp(node->getName(), "transformation")) {
FGPanelTransformation * t = readTransformation(node, w_scale, h_scale);
if (t != 0)
layer->addTransformation(t);
int nActions = action_group->nChildren();
for (int i = 0; i < nActions; i++) {
const SGPropertyNode * node = action_group->getChild(i);
- if (string(node->getName()) == "action") {
+ if (!strcmp(node->getName(), "action")) {
FGPanelAction * action = readAction(node, w_scale, h_scale);
if (action != 0)
instrument->addAction(action);
int nLayers = layer_group->nChildren();
for (int i = 0; i < nLayers; i++) {
const SGPropertyNode * node = layer_group->getChild(i);
- if (string(node->getName()) == "layer") {
+ if (!strcmp(node->getName(), "layer")) {
FGInstrumentLayer * layer = readLayer(node, w_scale, h_scale);
if (layer != 0)
instrument->addLayer(layer);
int nInstruments = instrument_group->nChildren();
for (int i = 0; i < nInstruments; i++) {
const SGPropertyNode * node = instrument_group->getChild(i);
- if (string(node->getName()) == "instrument") {
+ if (!strcmp(node->getName(), "instrument")) {
FGPanelInstrument * instrument = readInstrument(node);
if (instrument != 0)
panel->addInstrument(instrument);