Fixed: Some compilation errors

This commit is contained in:
kervala 2010-09-25 22:43:11 +02:00
parent 264e3ccc9d
commit 3bf713f884
5 changed files with 16 additions and 14 deletions

View file

@ -81,6 +81,10 @@ FIND_PACKAGE(Jpeg)
IF(WIN32) IF(WIN32)
INCLUDE(${CMAKE_ROOT}/Modules/Platform/Windows-cl.cmake) INCLUDE(${CMAKE_ROOT}/Modules/Platform/Windows-cl.cmake)
SET(WINSOCK2_LIB ws2_32.lib) SET(WINSOCK2_LIB ws2_32.lib)
IF(WITH_MFC)
FIND_PACKAGE(CustomMFC REQUIRED)
ENDIF(WITH_MFC)
ENDIF(WIN32) ENDIF(WIN32)
IF(WITH_STATIC) IF(WITH_STATIC)
@ -89,10 +93,6 @@ IF(WITH_STATIC)
SET(LIBXML2_LIBRARIES ${LIBXML2_LIBRARIES} ${WINSOCK2_LIB}) SET(LIBXML2_LIBRARIES ${LIBXML2_LIBRARIES} ${WINSOCK2_LIB})
ENDIF(WITH_STATIC) ENDIF(WITH_STATIC)
IF(WITH_MFC)
FIND_PACKAGE(CustomMFC REQUIRED)
ENDIF(WITH_MFC)
IF(WITH_STLPORT) IF(WITH_STLPORT)
FIND_PACKAGE(STLport REQUIRED) FIND_PACKAGE(STLport REQUIRED)
INCLUDE_DIRECTORIES(${STLPORT_INCLUDE_DIR}) INCLUDE_DIRECTORIES(${STLPORT_INCLUDE_DIR})

View file

@ -14,8 +14,8 @@
// You should have received a copy of the GNU Affero General Public License // You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>. // along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <nel/misc/file.h> #include "nel/misc/file.h"
#include <nel/misc/config_file.h> #include "nel/misc/config_file.h"
using namespace std; using namespace std;
using namespace NLMISC; using namespace NLMISC;
@ -134,7 +134,10 @@ void removeDirectory (string &str)
// Remove begin space // Remove begin space
string::size_type pos = str.rfind ('\\'); string::size_type pos = str.rfind ('\\');
string::size_type pos2 = str.rfind ('/'); string::size_type pos2 = str.rfind ('/');
pos = std::max (pos, pos2);
if (pos == string::npos)
pos = pos2;
if (pos != string::npos) if (pos != string::npos)
str = str.substr (pos+1, str.size()); str = str.substr (pos+1, str.size());
} }
@ -269,7 +272,7 @@ void extractStringsFromASCII (const vector<char> &fileArray, set<string> &filena
if (end != begin) if (end != begin)
{ {
// String size // String size
uint size = (uint)end-(uint)begin; uint size = (uint)(end-begin);
temp.resize (size); temp.resize (size);
// Copy the string // Copy the string

View file

@ -14,10 +14,9 @@
// You should have received a copy of the GNU Affero General Public License // You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>. // along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "stdafx.h" #include "nel/misc/types_nl.h"
#include <nel/misc/types_nl.h> #include "nel/misc/time_nl.h"
#include <nel/misc/time_nl.h> #include "nel/misc/common.h"
#include <nel/misc/common.h>
#include <stdio.h> #include <stdio.h>
using namespace NLMISC; using namespace NLMISC;

View file

@ -522,7 +522,7 @@ private:
void updateSelectionAxisSize(); void updateSelectionAxisSize();
CViewBitmap *newSelectionAxis(NLMISC::CRGBA color); CViewBitmap *newSelectionAxis(NLMISC::CRGBA color);
void computeFrustumQuad(CQuad &fruQuad) const; void computeFrustumQuad(NLMISC::CQuad &fruQuad) const;
}; };
#endif #endif

View file

@ -998,7 +998,7 @@ T *createObjectFromClassName(const std::string &className)
if (className.empty()) return NULL; if (className.empty()) return NULL;
try try
{ {
IClassable *obj = NLMISC::CClassRegistry::create(className); NLMISC::IClassable *obj = NLMISC::CClassRegistry::create(className);
if (!obj) if (!obj)
{ {
nlwarning("Couldn't create object of class %s", className.c_str()); nlwarning("Couldn't create object of class %s", className.c_str());