Skip to content

Commit c5c76fa

Browse files
committed
Drop the consts from function return types; they don't do anything in C anyway.
Signed-off-by: Drew Fisher <[email protected]>
1 parent 856095c commit c5c76fa

File tree

3 files changed

+15
-15
lines changed

3 files changed

+15
-15
lines changed

fakenect/fakenect.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ int freenect_set_depth_mode(freenect_device* dev, const freenect_frame_mode mode
264264
return 0;
265265
}
266266

267-
const freenect_frame_mode freenect_find_video_mode(freenect_resolution res, freenect_video_format fmt) {
267+
freenect_frame_mode freenect_find_video_mode(freenect_resolution res, freenect_video_format fmt) {
268268
assert(FREENECT_RESOLUTION_MEDIUM == res);
269269
assert(FREENECT_VIDEO_RGB == fmt);
270270
// NOTE: This will leave uninitialized values if new fields are added.
@@ -273,7 +273,7 @@ const freenect_frame_mode freenect_find_video_mode(freenect_resolution res, free
273273
return out;
274274
}
275275

276-
const freenect_frame_mode freenect_find_depth_mode(freenect_resolution res, freenect_depth_format fmt) {
276+
freenect_frame_mode freenect_find_depth_mode(freenect_resolution res, freenect_depth_format fmt) {
277277
assert(FREENECT_RESOLUTION_MEDIUM == res);
278278
assert(FREENECT_DEPTH_11BIT == fmt);
279279
// NOTE: This will leave uninitialized values if new fields are added.

include/libfreenect.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,7 @@ FREENECTAPI int freenect_get_video_mode_count();
457457
*
458458
* @return A freenect_frame_mode describing the nth video mode
459459
*/
460-
FREENECTAPI const freenect_frame_mode freenect_get_video_mode(int mode_num);
460+
FREENECTAPI freenect_frame_mode freenect_get_video_mode(int mode_num);
461461

462462
/**
463463
* Get the frame descriptor of the current video mode for the specified
@@ -467,7 +467,7 @@ FREENECTAPI const freenect_frame_mode freenect_get_video_mode(int mode_num);
467467
*
468468
* @return A freenect_frame_mode describing the current video mode of the specified device
469469
*/
470-
FREENECTAPI const freenect_frame_mode freenect_get_current_video_mode(freenect_device *dev);
470+
FREENECTAPI freenect_frame_mode freenect_get_current_video_mode(freenect_device *dev);
471471

472472
/**
473473
* Convenience function to return a mode descriptor matching the
@@ -478,7 +478,7 @@ FREENECTAPI const freenect_frame_mode freenect_get_current_video_mode(freenect_d
478478
*
479479
* @return A freenect_frame_mode that matches the arguments specified, if such a valid mode exists; otherwise, an invalid freenect_frame_mode.
480480
*/
481-
FREENECTAPI const freenect_frame_mode freenect_find_video_mode(freenect_resolution res, freenect_video_format fmt);
481+
FREENECTAPI freenect_frame_mode freenect_find_video_mode(freenect_resolution res, freenect_video_format fmt);
482482

483483
/**
484484
* Sets the current video mode for the specified device. If the
@@ -492,7 +492,7 @@ FREENECTAPI const freenect_frame_mode freenect_find_video_mode(freenect_resoluti
492492
*
493493
* @return 0 on success, < 0 if error
494494
*/
495-
FREENECTAPI int freenect_set_video_mode(freenect_device* dev, const freenect_frame_mode mode);
495+
FREENECTAPI int freenect_set_video_mode(freenect_device* dev, freenect_frame_mode mode);
496496

497497
/**
498498
* Get the number of depth camera modes supported by the driver. This includes both RGB and IR modes.
@@ -509,7 +509,7 @@ FREENECTAPI int freenect_get_depth_mode_count();
509509
*
510510
* @return A freenect_frame_mode describing the nth depth mode
511511
*/
512-
FREENECTAPI const freenect_frame_mode freenect_get_depth_mode(int mode_num);
512+
FREENECTAPI freenect_frame_mode freenect_get_depth_mode(int mode_num);
513513

514514
/**
515515
* Get the frame descriptor of the current depth mode for the specified
@@ -519,7 +519,7 @@ FREENECTAPI const freenect_frame_mode freenect_get_depth_mode(int mode_num);
519519
*
520520
* @return A freenect_frame_mode describing the current depth mode of the specified device
521521
*/
522-
FREENECTAPI const freenect_frame_mode freenect_get_current_depth_mode(freenect_device *dev);
522+
FREENECTAPI freenect_frame_mode freenect_get_current_depth_mode(freenect_device *dev);
523523

524524
/**
525525
* Convenience function to return a mode descriptor matching the
@@ -530,7 +530,7 @@ FREENECTAPI const freenect_frame_mode freenect_get_current_depth_mode(freenect_d
530530
*
531531
* @return A freenect_frame_mode that matches the arguments specified, if such a valid mode exists; otherwise, an invalid freenect_frame_mode.
532532
*/
533-
FREENECTAPI const freenect_frame_mode freenect_find_depth_mode(freenect_resolution res, freenect_depth_format fmt);
533+
FREENECTAPI freenect_frame_mode freenect_find_depth_mode(freenect_resolution res, freenect_depth_format fmt);
534534

535535
/**
536536
* Sets the current depth mode for the specified device. The mode

src/cameras.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1190,7 +1190,7 @@ int freenect_get_video_mode_count()
11901190
return video_mode_count;
11911191
}
11921192

1193-
const freenect_frame_mode freenect_get_video_mode(int mode_num)
1193+
freenect_frame_mode freenect_get_video_mode(int mode_num)
11941194
{
11951195
if (mode_num >= 0 && mode_num < video_mode_count)
11961196
return supported_video_modes[mode_num];
@@ -1199,12 +1199,12 @@ const freenect_frame_mode freenect_get_video_mode(int mode_num)
11991199
return retval;
12001200
}
12011201

1202-
const freenect_frame_mode freenect_get_current_video_mode(freenect_device *dev)
1202+
freenect_frame_mode freenect_get_current_video_mode(freenect_device *dev)
12031203
{
12041204
return freenect_find_video_mode(dev->video_resolution, dev->video_format);
12051205
}
12061206

1207-
const freenect_frame_mode freenect_find_video_mode(freenect_resolution res, freenect_video_format fmt)
1207+
freenect_frame_mode freenect_find_video_mode(freenect_resolution res, freenect_video_format fmt)
12081208
{
12091209
uint32_t unique_id = MAKE_RESERVED(res, fmt);
12101210
int i;
@@ -1253,7 +1253,7 @@ int freenect_get_depth_mode_count()
12531253
return depth_mode_count;
12541254
}
12551255

1256-
const freenect_frame_mode freenect_get_depth_mode(int mode_num)
1256+
freenect_frame_mode freenect_get_depth_mode(int mode_num)
12571257
{
12581258
if (mode_num >= 0 && mode_num < depth_mode_count)
12591259
return supported_depth_modes[mode_num];
@@ -1262,12 +1262,12 @@ const freenect_frame_mode freenect_get_depth_mode(int mode_num)
12621262
return retval;
12631263
}
12641264

1265-
const freenect_frame_mode freenect_get_current_depth_mode(freenect_device *dev)
1265+
freenect_frame_mode freenect_get_current_depth_mode(freenect_device *dev)
12661266
{
12671267
return freenect_find_depth_mode(dev->depth_resolution, dev->depth_format);
12681268
}
12691269

1270-
const freenect_frame_mode freenect_find_depth_mode(freenect_resolution res, freenect_depth_format fmt)
1270+
freenect_frame_mode freenect_find_depth_mode(freenect_resolution res, freenect_depth_format fmt)
12711271
{
12721272
uint32_t unique_id = MAKE_RESERVED(res, fmt);
12731273
int i;

0 commit comments

Comments
 (0)