From: Javier Sancho Date: Thu, 7 May 2020 11:23:47 +0000 (+0200) Subject: driver-types X-Git-Url: https://git.jsancho.org/?a=commitdiff_plain;h=10b175d2183bb4dbe9a53c773465ed714e890290;p=guile-irrlicht.git driver-types --- diff --git a/src/driver-types.cpp b/src/driver-types.cpp index 886d40d..d0fec50 100644 --- a/src/driver-types.cpp +++ b/src/driver-types.cpp @@ -23,41 +23,41 @@ #include #include "driver-types.h" -extern "C" { - - irr::video::E_DRIVER_TYPE - scm_to_driver_type (SCM driver_type) - { - char* driverType = scm_to_utf8_stringn (scm_symbol_to_string (driver_type), NULL); - if (!strcmp (driverType, "null")) - { - return irr::video::EDT_NULL; - } - else if (!strcmp (driverType, "software")) - { - return irr::video::EDT_SOFTWARE; - } - else if (!strcmp (driverType, "burnings")) - { - return irr::video::EDT_BURNINGSVIDEO; - } - else if (!strcmp (driverType, "direct3d8")) - { - return irr::video::EDT_DIRECT3D8; - } - else if (!strcmp (driverType, "direct3d9")) - { - return irr::video::EDT_DIRECT3D9; - } - else if (!strcmp (driverType, "opengl")) - { - return irr::video::EDT_OPENGL; - } - else - { - scm_error (scm_arg_type_key, NULL, "Wrong driver type: ~S", - scm_list_1 (driver_type), scm_list_1 (driver_type)); - } - } +using namespace irr; + + +video::E_DRIVER_TYPE +scm_to_driver_type (SCM driver_type) +{ + char* driverType = scm_to_utf8_stringn (scm_symbol_to_string (driver_type), NULL); + if (!strcmp (driverType, "null")) + { + return video::EDT_NULL; + } + else if (!strcmp (driverType, "software")) + { + return video::EDT_SOFTWARE; + } + else if (!strcmp (driverType, "burnings")) + { + return video::EDT_BURNINGSVIDEO; + } + else if (!strcmp (driverType, "direct3d8")) + { + return video::EDT_DIRECT3D8; + } + else if (!strcmp (driverType, "direct3d9")) + { + return video::EDT_DIRECT3D9; + } + else if (!strcmp (driverType, "opengl")) + { + return video::EDT_OPENGL; + } + else + { + scm_error (scm_arg_type_key, NULL, "Wrong driver type: ~S", + scm_list_1 (driver_type), scm_list_1 (driver_type)); + } } diff --git a/src/driver-types.h b/src/driver-types.h index dff3802..acabf0b 100644 --- a/src/driver-types.h +++ b/src/driver-types.h @@ -25,11 +25,7 @@ #include #include -extern "C" { - - irr::video::E_DRIVER_TYPE - scm_to_driver_type (SCM driver_type); - -} +irr::video::E_DRIVER_TYPE +scm_to_driver_type (SCM driver_type); #endif