x64 or LP64

This commit is contained in:
Keisuke Ogaki 2016-06-02 19:28:29 +09:00
parent 876ca8276d
commit e6172ddf26

View file

@ -1,11 +1,10 @@
#include "tiio_psd.h"
#include "trasterimage.h"
#include "timageinfo.h"
#ifdef __LP64__
#if (defined(x64) || defined(__LP64__))
#include "toonz/preferences.h"
#endif
#include <QtCore>
#endif
// forward declaration
//class TImageReaderLayerPsd;
@ -41,16 +40,15 @@ TLevelReaderPsd::TLevelReaderPsd(const TFilePath &path)
const QString &layerStr = list.at(1);
#ifdef REF_LAYER_BY_NAME
#if (defined(x64) || defined(__LP64__))
if (layerStr != "frames") {
#ifdef __LP64__
QTextCodec* layerNameCodec = QTextCodec::codecForName( Preferences::instance()->getLayerNameEncoding().c_str() );
#else
QTextCodec* layerNameCodec = QTextCodec::codecForName( "SJIS" );
#endif
TPSDParser psdparser(m_path);
m_layerId = psdparser.getLevelIdByName(layerNameCodec->fromUnicode(layerStr).toStdString());
} else
} else {
m_layerId = layerStr.toInt();
}
#endif
#else
m_layerId = layerName.toInt();
#endif