diff --git a/include/libfreenect-audio.h b/include/libfreenect-audio.h index 3f2febab..108cf381 100644 --- a/include/libfreenect-audio.h +++ b/include/libfreenect-audio.h @@ -24,8 +24,7 @@ * either License. */ -#ifndef LIBFREENECT_AUDIO_H -#define LIBFREENECT_AUDIO_H +#pragma once #include #include @@ -114,7 +113,3 @@ FREENECTAPI int freenect_stop_audio(freenect_device* dev); #ifdef __cplusplus } #endif - -#endif // - - diff --git a/include/libfreenect-registration.h b/include/libfreenect-registration.h index 2ef5d609..7ad2b5bb 100644 --- a/include/libfreenect-registration.h +++ b/include/libfreenect-registration.h @@ -24,8 +24,7 @@ * either License. */ -#ifndef LIBFREENECT_REGISTRATION_H -#define LIBFREENECT_REGISTRATION_H +#pragma once #include #include @@ -125,5 +124,3 @@ FREENECTAPI void freenect_camera_to_world(freenect_device* dev, #ifdef __cplusplus } #endif - -#endif // LIBFREENECT_REGISTRATION_H diff --git a/include/libfreenect.h b/include/libfreenect.h index 4dfb6b19..13c7c4c5 100644 --- a/include/libfreenect.h +++ b/include/libfreenect.h @@ -24,8 +24,7 @@ * either License. */ -#ifndef LIBFREENECT_H -#define LIBFREENECT_H +#pragma once #include @@ -618,6 +617,3 @@ FREENECTAPI int freenect_set_depth_mode(freenect_device* dev, const freenect_fra #ifdef __cplusplus } #endif - -#endif // - diff --git a/platform/windows/README.TXT b/platform/windows/README.TXT index f580e50c..65df1bc0 100644 --- a/platform/windows/README.TXT +++ b/platform/windows/README.TXT @@ -64,12 +64,10 @@ on using the C-compiler to compile .c files (this happens with MSVC versions pri 2010). To work around this, just set the "Compile As" to "Default", click "Apply" and then set it back to "Compile as C++ Code (/TP)", click "Apply" and then "OK". -Another problem is that Visual C++ does not offer the and -headers. However, they are pretty simple to be emulated; the will -actually be a dummy header because C++ already defines the "bool" type semantics, -while the has to simply #include and define the "ssize_t" -type. The implementation of these headers are located at: - "libfreenect\platform\windows" +Another problem is that Visual C++ does not offer . However, it +can be emulated by #include and defining the "ssize_t" type. +The implementation of is located at: + "libfreenect\platform\windows\unistd.h" NOTE: MSVC versions prior to 2010 do not provide the header. An ISO C9x compilant header for such MSVC versions can be found at the wikipedia entry diff --git a/platform/windows/libusb10emu/libusb-1.0/failguard.h b/platform/windows/libusb10emu/libusb-1.0/failguard.h index 3330aca6..da9bea79 100644 --- a/platform/windows/libusb10emu/libusb-1.0/failguard.h +++ b/platform/windows/libusb10emu/libusb-1.0/failguard.h @@ -1,5 +1,4 @@ -#ifndef LIBUSBEMU_FAIL_GUARD_H -#define LIBUSBEMU_FAIL_GUARD_H +#pragma once namespace libusbemu { @@ -12,5 +11,3 @@ namespace libusbemu const bool Abort(); } } - -#endif//LIBUSBEMU_FAIL_GUARD_H diff --git a/platform/windows/libusb10emu/libusb-1.0/libusb.h b/platform/windows/libusb10emu/libusb-1.0/libusb.h index 197e7886..33b32887 100644 --- a/platform/windows/libusb10emu/libusb-1.0/libusb.h +++ b/platform/windows/libusb10emu/libusb-1.0/libusb.h @@ -24,8 +24,7 @@ * either License. */ -#ifndef LIBUSB_1_0_INTERFACE_EMULATOR_FOR_LIBUSB_0_1_H -#define LIBUSB_1_0_INTERFACE_EMULATOR_FOR_LIBUSB_0_1_H +#pragma once // This interface emulator requires the libusb-win32 v1.2.2.1 (snapshot) // or later. Prior win32 versions of the library were not conformal to @@ -198,5 +197,3 @@ enum libusb_error #ifdef __cplusplus } #endif - -#endif//LIBUSB_1_0_INTERFACE_EMULATOR_FOR_LIBUSB_0_1_H diff --git a/platform/windows/libusb10emu/libusb-1.0/libusbemu_internal.h b/platform/windows/libusb10emu/libusb-1.0/libusbemu_internal.h index 162899a6..1631d1a8 100644 --- a/platform/windows/libusb10emu/libusb-1.0/libusbemu_internal.h +++ b/platform/windows/libusb10emu/libusb-1.0/libusbemu_internal.h @@ -24,8 +24,7 @@ * either License. */ -#ifndef LIBUSB_EMULATOR_INTERNAL_H -#define LIBUSB_EMULATOR_INTERNAL_H +#pragma once #include "libusbemu_threads.h" #include @@ -413,5 +412,3 @@ void libusbemu_clear_transfer(transfer_wrapper* wrapper) } } // end of 'namespace libusbemu' - -#endif//LIBUSB_EMULATOR_INTERNAL_H diff --git a/platform/windows/libusb10emu/libusb-1.0/libusbemu_threads.h b/platform/windows/libusb10emu/libusb-1.0/libusbemu_threads.h index c0c83c74..daf03f64 100644 --- a/platform/windows/libusb10emu/libusb-1.0/libusbemu_threads.h +++ b/platform/windows/libusb10emu/libusb-1.0/libusbemu_threads.h @@ -24,8 +24,7 @@ * either License. */ -#ifndef LIBUSBEMU_THREAD_INTERFACE_WRAPPER_H -#define LIBUSBEMU_THREAD_INTERFACE_WRAPPER_H +#pragma once // Wrappers for platform-specific thread/synchronization objects: // * Thread @@ -56,6 +55,4 @@ struct RAIIMutex ~RAIIMutex() { m_mutex.Leave(); } }; -}; - -#endif//LIBUSBEMU_THREAD_INTERFACE_WRAPPER_H +} diff --git a/platform/windows/libusb10emu/libusb-1.0/libusbemu_threads_win32.h b/platform/windows/libusb10emu/libusb-1.0/libusbemu_threads_win32.h index 09638a0a..eaf6ba7e 100644 --- a/platform/windows/libusb10emu/libusb-1.0/libusbemu_threads_win32.h +++ b/platform/windows/libusb10emu/libusb-1.0/libusbemu_threads_win32.h @@ -24,8 +24,7 @@ * either License. */ -#ifndef LIBUSBEMU_THREAD_INTERFACE_WRAPPER_FOR_WIN32_THREADS_H -#define LIBUSBEMU_THREAD_INTERFACE_WRAPPER_FOR_WIN32_THREADS_H +#pragma once #include #include @@ -320,5 +319,3 @@ struct EventList }; } //end of 'namespace libusbemu' - -#endif//LIBUSBEMU_THREAD_INTERFACE_WRAPPER_FOR_WIN32_THREADS_H diff --git a/platform/windows/stdbool.h b/platform/windows/stdbool.h deleted file mode 100644 index ca5e57dd..00000000 --- a/platform/windows/stdbool.h +++ /dev/null @@ -1,30 +0,0 @@ -/* - * This file is part of the OpenKinect Project. http://www.openkinect.org - * - * Copyright (c) 2010 individual OpenKinect contributors. See the CONTRIB file - * for details. - * - * This code is licensed to you under the terms of the Apache License, version - * 2.0, or, at your option, the terms of the GNU General Public License, - * version 2.0. See the APACHE20 and GPL2 files for the text of the licenses, - * or the following URLs: - * http://www.apache.org/licenses/LICENSE-2.0 - * http://www.gnu.org/licenses/gpl-2.0.txt - * - * If you redistribute this file in source form, modified or unmodified, you - * may: - * 1) Leave this header intact and distribute it under the same terms, - * accompanying it with the APACHE20 and GPL20 files, or - * 2) Delete the Apache 2.0 clause and accompany it with the GPL2 file, or - * 3) Delete the GPL v2 clause and accompany it with the APACHE20 file - * In all cases you must keep the copyright notice intact and include a copy - * of the CONTRIB file. - * - * Binary distributions must follow the binary distribution requirements of - * either License. - */ - -#ifndef _WINDOWS_STDBOOL_EMULATED_H_ -#define _WINDOWS_STDBOOL_EMULATED_H_ - -#endif//_WINDOWS_STDBOOL_EMULATED_H_ diff --git a/platform/windows/unistd.h b/platform/windows/unistd.h index fa9c9580..25965356 100644 --- a/platform/windows/unistd.h +++ b/platform/windows/unistd.h @@ -24,8 +24,7 @@ * either License. */ -#ifndef _WINDOWS_UNISTD_EMULATED_H_ -#define _WINDOWS_UNISTD_EMULATED_H_ +#pragma once #include @@ -36,5 +35,3 @@ #define _SSIZE_T_ typedef long ssize_t; #endif // _SSIZE_T_ - -#endif//_WINDOWS_UNISTD_EMULATED_H_ diff --git a/src/cameras.h b/src/cameras.h index 7091ed52..a31e23fc 100644 --- a/src/cameras.h +++ b/src/cameras.h @@ -24,8 +24,7 @@ * either License. */ -#ifndef CAMERAS_H -#define CAMERAS_H +#pragma once #include "libfreenect.h" @@ -35,6 +34,3 @@ // camera-specific protocol support. int freenect_camera_init(freenect_device *dev); int freenect_camera_teardown(freenect_device *dev); - -#endif - diff --git a/src/freenect_internal.h b/src/freenect_internal.h index 390e0612..640d23b6 100644 --- a/src/freenect_internal.h +++ b/src/freenect_internal.h @@ -24,8 +24,7 @@ * either License. */ -#ifndef FREENECT_INTERNAL_H -#define FREENECT_INTERNAL_H +#pragma once #include @@ -240,5 +239,3 @@ struct _freenect_device { fnusb_dev usb_motor; freenect_raw_tilt_state raw_state; }; - -#endif diff --git a/src/loader.h b/src/loader.h index 82782205..c8c05896 100644 --- a/src/loader.h +++ b/src/loader.h @@ -24,8 +24,7 @@ * either License. */ -#ifndef __LOADER_H__ -#define __LOADER_H__ +#pragma once #include #include "usb_libusb10.h" @@ -56,5 +55,3 @@ typedef struct { int upload_firmware(fnusb_dev* dev); int upload_cemd_data(fnusb_dev* dev); - -#endif //__LOADER_H__ diff --git a/src/registration.h b/src/registration.h index ce09b2dc..7da245c8 100644 --- a/src/registration.h +++ b/src/registration.h @@ -24,8 +24,7 @@ * either License. */ -#ifndef REGISTRATION_H -#define REGISTRATION_H +#pragma once #include "libfreenect.h" @@ -33,5 +32,3 @@ int freenect_init_registration(freenect_device* dev); int freenect_apply_registration(freenect_device* dev, uint8_t* input_packed, uint16_t* output_mm); int freenect_apply_depth_to_mm(freenect_device* dev, uint8_t* input_packed, uint16_t* output_mm); - -#endif diff --git a/src/usb_libusb10.c b/src/usb_libusb10.c index 4a95e02b..065bf6f6 100644 --- a/src/usb_libusb10.c +++ b/src/usb_libusb10.c @@ -25,7 +25,6 @@ */ #include -#include #include #include #include diff --git a/src/usb_libusb10.h b/src/usb_libusb10.h index f2e0bd73..9133a3c4 100644 --- a/src/usb_libusb10.h +++ b/src/usb_libusb10.h @@ -24,8 +24,7 @@ * either License. */ -#ifndef USB_LIBUSB10 -#define USB_LIBUSB10 +#pragma once #include "libfreenect.h" #include @@ -103,5 +102,3 @@ int fnusb_control(fnusb_dev *dev, uint8_t bmRequestType, uint8_t bRequest, uint1 int fnusb_bulk(fnusb_dev *dev, uint8_t endpoint, uint8_t *data, int len, int *transferred); int fnusb_num_interfaces(fnusb_dev *dev); #endif - -#endif diff --git a/wrappers/actionscript/server/as3_jpeg.h b/wrappers/actionscript/server/as3_jpeg.h index d883a298..57049c5b 100755 --- a/wrappers/actionscript/server/as3_jpeg.h +++ b/wrappers/actionscript/server/as3_jpeg.h @@ -24,8 +24,7 @@ * either License. */ -#ifndef SERVER_JPEG_H -#define SERVER_JPEG_H +#pragma once #ifdef __cplusplus extern "C" { @@ -40,5 +39,3 @@ int RGB_2_JPEG(unsigned char *buffer, unsigned char **compressed, long unsigned #ifdef __cplusplus } #endif - -#endif \ No newline at end of file diff --git a/wrappers/actionscript/server/freenect_network.h b/wrappers/actionscript/server/freenect_network.h index 88b8b9f2..6335a0a7 100755 --- a/wrappers/actionscript/server/freenect_network.h +++ b/wrappers/actionscript/server/freenect_network.h @@ -24,8 +24,7 @@ * either License. */ -#ifndef FREENECT_SERVER_H -#define FREENECT_SERVER_H +#pragma once #ifdef __cplusplus extern "C" { @@ -62,5 +61,3 @@ extern "C" { #ifdef __cplusplus } #endif - -#endif \ No newline at end of file diff --git a/wrappers/c_sync/libfreenect_sync.h b/wrappers/c_sync/libfreenect_sync.h index 35e76c40..923074b5 100644 --- a/wrappers/c_sync/libfreenect_sync.h +++ b/wrappers/c_sync/libfreenect_sync.h @@ -24,8 +24,8 @@ * either License. */ -#ifndef FREENECT_SYNC_H -#define FREENECT_SYNC_H +#pragma once + #include #include @@ -104,5 +104,3 @@ void freenect_sync_stop(void); #ifdef __cplusplus } #endif - -#endif diff --git a/wrappers/opencv/libfreenect_cv.h b/wrappers/opencv/libfreenect_cv.h index a2efcc2c..b73b60c9 100644 --- a/wrappers/opencv/libfreenect_cv.h +++ b/wrappers/opencv/libfreenect_cv.h @@ -1,5 +1,4 @@ -#ifndef FREENECT_CV_H -#define FREENECT_CV_H +#pragma once #ifdef __cplusplus extern "C" { @@ -13,5 +12,3 @@ extern "C" { #ifdef __cplusplus } #endif - -#endif \ No newline at end of file