Merge branch 'master' into compressed_json
commit
b9b62d106c
|
@ -135,11 +135,11 @@ IF ( WIN32 )
|
||||||
# Use subset of Windows.h
|
# Use subset of Windows.h
|
||||||
ADD_DEFINITIONS( -DWIN32_LEAN_AND_MEAN )
|
ADD_DEFINITIONS( -DWIN32_LEAN_AND_MEAN )
|
||||||
|
|
||||||
|
IF(MSVC)
|
||||||
OPTION ( ASSIMP_BUILD_ASSIMP_VIEW
|
OPTION ( ASSIMP_BUILD_ASSIMP_VIEW
|
||||||
"If the Assimp view tool is built. (requires DirectX)"
|
"If the Assimp view tool is built. (requires DirectX)"
|
||||||
OFF )
|
OFF )
|
||||||
|
|
||||||
IF(MSVC)
|
|
||||||
OPTION( ASSIMP_INSTALL_PDB
|
OPTION( ASSIMP_INSTALL_PDB
|
||||||
"Install MSVC debug files."
|
"Install MSVC debug files."
|
||||||
ON )
|
ON )
|
||||||
|
|
|
@ -1,17 +0,0 @@
|
||||||
# Find IrrXMl from irrlicht project
|
|
||||||
#
|
|
||||||
# Find LibIrrXML headers and library
|
|
||||||
#
|
|
||||||
# IRRXML_FOUND - IrrXML found
|
|
||||||
# IRRXML_INCLUDE_DIR - Headers location
|
|
||||||
# IRRXML_LIBRARY - IrrXML main library
|
|
||||||
|
|
||||||
find_path(IRRXML_INCLUDE_DIR irrXML.h
|
|
||||||
PATH_SUFFIXES include/irrlicht include/irrxml)
|
|
||||||
find_library(IRRXML_LIBRARY IrrXML)
|
|
||||||
|
|
||||||
include(FindPackageHandleStandardArgs)
|
|
||||||
find_package_handle_standard_args(IrrXML REQUIRED_VARS IRRXML_INCLUDE_DIR IRRXML_LIBRARY)
|
|
||||||
|
|
||||||
|
|
||||||
mark_as_advanced(IRRXML_INCLUDE_DIR IRRXML_LIBRARY)
|
|
|
@ -192,6 +192,10 @@ Scope::Scope(Parser& parser,bool topLevel)
|
||||||
}
|
}
|
||||||
|
|
||||||
const std::string& str = n->StringContents();
|
const std::string& str = n->StringContents();
|
||||||
|
if (str.empty()) {
|
||||||
|
ParseError("unexpected content: empty string.");
|
||||||
|
}
|
||||||
|
|
||||||
elements.insert(ElementMap::value_type(str,new_Element(*n,parser)));
|
elements.insert(ElementMap::value_type(str,new_Element(*n,parser)));
|
||||||
|
|
||||||
// Element() should stop at the next Key token (or right after a Close token)
|
// Element() should stop at the next Key token (or right after a Close token)
|
||||||
|
|
|
@ -59,13 +59,16 @@ void CommentRemover::RemoveLineComments(const char* szComment,
|
||||||
ai_assert(nullptr != szBuffer);
|
ai_assert(nullptr != szBuffer);
|
||||||
ai_assert(*szComment);
|
ai_assert(*szComment);
|
||||||
|
|
||||||
const size_t len = strlen(szComment);
|
size_t len = strlen(szComment);
|
||||||
|
const size_t lenBuffer = strlen(szBuffer);
|
||||||
|
if (len > lenBuffer) {
|
||||||
|
len = lenBuffer;
|
||||||
|
}
|
||||||
while (*szBuffer) {
|
while (*szBuffer) {
|
||||||
|
|
||||||
// skip over quotes
|
// skip over quotes
|
||||||
if (*szBuffer == '\"' || *szBuffer == '\'')
|
if (*szBuffer == '\"' || *szBuffer == '\'')
|
||||||
while (*szBuffer++ && *szBuffer != '\"' && *szBuffer != '\'');
|
while (*szBuffer++ && *szBuffer != '\"' && *szBuffer != '\'');
|
||||||
|
|
||||||
if (!strncmp(szBuffer,szComment,len)) {
|
if (!strncmp(szBuffer,szComment,len)) {
|
||||||
while (!IsLineEnd(*szBuffer))
|
while (!IsLineEnd(*szBuffer))
|
||||||
*szBuffer++ = chReplacement;
|
*szBuffer++ = chReplacement;
|
||||||
|
|
Loading…
Reference in New Issue