* Replace index() with strchr(), which is the same but also exists
  in windows.
This commit is contained in:
jean.chalard
2010-06-12 04:13:12 +00:00
parent d618aa4e6e
commit b25cd5d041
+3 -2
View File
@@ -1,3 +1,4 @@
#include <string.h>
#include "../include/config.h"
#include "../include/MTGDeck.h"
#include "../include/utils.h"
@@ -146,7 +147,7 @@ int MTGAllCards::processConfLine(string &s, MTGCard *card, CardPrimitive * primi
case 's': //subtype
if(!primitive) primitive = NEW CardPrimitive();
while (true){
char* found = index(val, ' ');
char* found = strchr(val, ' ');
if (found) {
string value(val, found - val);
primitive->setSubtype(value);
@@ -169,7 +170,7 @@ int MTGAllCards::processConfLine(string &s, MTGCard *card, CardPrimitive * primi
primitive->setText(val);
else if (0 == strcmp("type", key)) {
while (true){
char* found = index(val, ' ');
char* found = strchr(val, ' ');
if (found) {
string value(val, found - val);
primitive->setType(value);