forked from Mirrors/openclonk
Merge default into floating-point
commit
dda2fb17a9
|
@ -96,6 +96,8 @@ if(CMAKE_COMPILER_IS_GNUCXX)
|
|||
if(USE_GCC_STD_0X)
|
||||
list(APPEND OC_CXX_FLAGS "-std=gnu++0x")
|
||||
endif()
|
||||
# isilkor 10-10-04: disable a useless warning
|
||||
list(APPEND OC_CXX_FLAGS "-Wno-non-template-friend")
|
||||
endif()
|
||||
|
||||
# ck 09-09-20: CMAKE_REQUIRED_FLAGS requires a string, not a list.
|
||||
|
@ -535,6 +537,8 @@ set(OC_CLONK_SOURCES
|
|||
src/script/C4Aul.h
|
||||
src/script/C4AulLink.cpp
|
||||
src/script/C4AulParse.cpp
|
||||
src/script/C4Numeric.cpp
|
||||
src/script/C4Numeric.h
|
||||
src/script/C4PropList.cpp
|
||||
src/script/C4PropList.h
|
||||
src/script/C4Script.cpp
|
||||
|
@ -551,6 +555,7 @@ set(OC_CLONK_SOURCES
|
|||
src/zlib/gzio.h
|
||||
src/zlib/gzio.c
|
||||
src/zlib/zutil.h
|
||||
thirdparty/simdmath/sse_mathfun.h
|
||||
thirdparty/timsort/sort.h
|
||||
)
|
||||
mark_as_advanced(OC_CLONK_SOURCES)
|
||||
|
@ -795,6 +800,11 @@ if(NOT Boost_INCLUDE_DIR)
|
|||
message(SEND_ERROR "Could not find the Boost C++ Libraries")
|
||||
else()
|
||||
include_directories(SYSTEM ${Boost_INCLUDE_DIR})
|
||||
set(CMAKE_REQUIRED_INCLUDES ${Boost_INCLUDE_DIR})
|
||||
CHECK_CXX_SOURCE_COMPILES("
|
||||
#include <boost/type_traits/is_pod.hpp>
|
||||
struct Pod {}; struct NonPod { NonPod() {} };
|
||||
int main() { int a[boost::is_pod<Pod>::value * 2 - 1], b[1 - 2 * boost::is_pod<NonPod>::value]; }" HAVE_WORKING_IS_POD)
|
||||
endif()
|
||||
|
||||
include(FindThreads)
|
||||
|
@ -960,6 +970,8 @@ add_executable(c4script
|
|||
src/script/C4AulExec.cpp
|
||||
src/script/C4AulLink.cpp
|
||||
src/script/C4AulParse.cpp
|
||||
src/script/C4Numeric.cpp
|
||||
src/script/C4Numeric.h
|
||||
src/script/C4StringTable.cpp
|
||||
src/script/C4PropList.cpp
|
||||
src/script/C4ScriptHost.cpp
|
||||
|
|
|
@ -129,6 +129,11 @@ src/config/C4SecurityCertificates.cpp \
|
|||
src/config/C4SecurityCertificates.h \
|
||||
src/lib/C4InputValidation.cpp \
|
||||
src/lib/C4InputValidation.h \
|
||||
src/lib/C4RealImpl_Fixed.cpp \
|
||||
src/lib/C4RealImpl_Fixed.h \
|
||||
src/lib/C4RealImpl_FPU.h \
|
||||
src/lib/C4RealImpl_SSE.cpp \
|
||||
src/lib/C4RealImpl_SSE.h \
|
||||
src/lib/SHA1.h \
|
||||
src/lib/Standard.cpp \
|
||||
src/lib/Standard.h \
|
||||
|
|
|
@ -210,3 +210,10 @@
|
|||
|
||||
/* Generate minidumps on crash */
|
||||
#cmakedefine HAVE_DBGHELP 1
|
||||
|
||||
/* Define to 1 if your compiler supports static_assert */
|
||||
#cmakedefine HAVE_STATIC_ASSERT 1
|
||||
|
||||
/* Define to 1 if your compiler correctly supports boost::is_pod */
|
||||
#cmakedefine HAVE_WORKING_IS_POD 1
|
||||
|
||||
|
|
|
@ -0,0 +1,28 @@
|
|||
<?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?>
|
||||
<!DOCTYPE funcs SYSTEM "../../../clonk.dtd">
|
||||
<?xml-stylesheet type="text/xsl" href="../../../clonk.xsl"?>
|
||||
<funcs>
|
||||
<func>
|
||||
<title>float<title>
|
||||
<category>Arithmetik</category>
|
||||
<version>4.10.0.0 OC</version>
|
||||
<syntax>
|
||||
<rtype>float</rtype>
|
||||
<params>
|
||||
<param><type>int</type><name>i</name><desc>Die Ganzzahl, die in eine Fließkommazahl konvertiert werden soll.</desc></param>
|
||||
</params>
|
||||
</syntax>
|
||||
<desc>Wandelt eine Ganzzahl in eine Fließkommazahl um. Ist der Wert von <em>i</em> nicht exakt darstellbar, wird der darstellbare Wert zurückgegeben, der die geringste Abweichung vom tatsächlichen Wert hat.</desc>
|
||||
<examples>
|
||||
<example>
|
||||
<code>float(2)</code>
|
||||
<text>Gibt die Zahl 2.0 zurück.</text>
|
||||
</example>
|
||||
</examples>
|
||||
</func>
|
||||
<related>
|
||||
<funclink>int</funclink>
|
||||
<funclink>C4Id</funclink>
|
||||
</related>
|
||||
<author>isilkor</author><date>2010-07-10</date>
|
||||
</funcs>
|
|
@ -0,0 +1,28 @@
|
|||
<?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?>
|
||||
<!DOCTYPE funcs SYSTEM "../../../clonk.dtd">
|
||||
<?xml-stylesheet type="text/xsl" href="../../../clonk.xsl"?>
|
||||
<funcs>
|
||||
<func>
|
||||
<title>int</title>
|
||||
<category>Arithmetik</category>
|
||||
<version>4.10.0.0 OC</version>
|
||||
<syntax>
|
||||
<rtype>int</rtype>
|
||||
<params>
|
||||
<param><type>float</type><name>f</name><desc>Die Fließkommazahl, die in eine Ganzzahl konvertiert werden soll.</desc></param>
|
||||
</params>
|
||||
</syntax>
|
||||
<desc>Wandelt eine Fließkommazahl in eine Ganzzahl um. Dabei werden Nachkommastellen abgeschnitten. Ist der Wert von <em>f</em> außerhalb des Wertebereichs einer vorzeichenbehafteten 32-bit-Ganzzahl, so ist der Rückgabewert <em>nil</em>.</desc>
|
||||
<examples>
|
||||
<example>
|
||||
<code>int(2.5)</code>
|
||||
<text>Gibt die Zahl 2 zurück.</text>
|
||||
</example>
|
||||
</examples>
|
||||
</func>
|
||||
<related>
|
||||
<funclink>float</funclink>
|
||||
<funclink>C4Id</funclink>
|
||||
</related>
|
||||
<author>isilkor</author><date>2010-07-10</date>
|
||||
</funcs>
|
Before Width: | Height: | Size: 618 KiB After Width: | Height: | Size: 618 KiB |
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue