Skip to content

Commit a977e68

Browse files
committed
Merge pull request #294 from laborer2008/master
Various small fixes
2 parents bf03243 + 696a2c7 commit a977e68

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

examples/protonect/src/cpu_depth_packet_processor.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ namespace libfreenect2
4444

4545
bool loadBufferFromFile2(const std::string& filename, unsigned char *buffer, size_t n)
4646
{
47-
bool success = true;
47+
bool success;
4848
std::ifstream in(filename.c_str());
4949

5050
in.read(reinterpret_cast<char*>(buffer), n);

examples/protonect/src/opencl_depth_packet_processor.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ class OpenCLDepthPacketProcessorImpl
348348
catch(const cl::Error &err)
349349
{
350350
std::cerr << OUT_NAME("init") "ERROR: " << err.what() << "(" << err.err() << ")" << std::endl;
351-
throw err;
351+
throw;
352352
}
353353
return true;
354354
}
@@ -462,7 +462,7 @@ class OpenCLDepthPacketProcessorImpl
462462
std::cout << OUT_NAME("init") "Build Log:\t " << program.getBuildInfo<CL_PROGRAM_BUILD_LOG>(device) << std::endl;
463463
}
464464

465-
throw err;
465+
throw;
466466
}
467467
programInitialized = true;
468468
return true;
@@ -507,8 +507,7 @@ class OpenCLDepthPacketProcessorImpl
507507
catch(const cl::Error &err)
508508
{
509509
std::cerr << OUT_NAME("run") "ERROR: " << err.what() << " (" << err.err() << ")" << std::endl;
510-
throw err;
511-
return;
510+
throw;
512511
}
513512
}
514513

examples/protonect/src/registration.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ void Registration::apply( int dx, int dy, float dz, float& cx, float &cy) const
8787
void Registration::apply(const Frame *rgb, const Frame *depth, Frame *undistorted, Frame *registered, const bool enable_filter) const
8888
{
8989
// Check if all frames are valid and have the correct size
90-
if (!undistorted || !rgb || !registered ||
90+
if (!rgb || !depth || !undistorted || !registered ||
9191
rgb->width != 1920 || rgb->height != 1080 || rgb->bytes_per_pixel != 4 ||
9292
depth->width != 512 || depth->height != 424 || depth->bytes_per_pixel != 4 ||
9393
undistorted->width != 512 || undistorted->height != 424 || undistorted->bytes_per_pixel != 4 ||

0 commit comments

Comments
 (0)