-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PR #10255 from Samer: fix GHA pr_check exit on error + fix line endings
- Loading branch information
Showing
10 changed files
with
818 additions
and
767 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
// License: Apache 2.0. See LICENSE file in root directory. | ||
// Copyright(c) 2021 Intel Corporation. All Rights Reserved. | ||
|
||
#pragma once | ||
|
||
|
||
// Disable declspec(dllexport) warnings: | ||
// Classes exported via LRS_EXTENSION_API are **not** part of official librealsense API (at least for now) | ||
// Any extension relying on these APIs must be compiled and distributed together with realsense2.dll | ||
#pragma warning(disable : 4275) /* disable: C4275: non dll-interface class used as base for dll-interface class */ | ||
#pragma warning(disable : 4251) /* disable: C4251: class needs to have dll-interface to be used by clients of class */ | ||
#ifdef WIN32 | ||
#define LRS_EXTENSION_API __declspec(dllexport) | ||
#else | ||
#define LRS_EXTENSION_API | ||
#endif | ||
// License: Apache 2.0. See LICENSE file in root directory. | ||
// Copyright(c) 2021 Intel Corporation. All Rights Reserved. | ||
|
||
#pragma once | ||
|
||
|
||
// Disable declspec(dllexport) warnings: | ||
// Classes exported via LRS_EXTENSION_API are **not** part of official librealsense API (at least for now) | ||
// Any extension relying on these APIs must be compiled and distributed together with realsense2.dll | ||
#pragma warning(disable : 4275) /* disable: C4275: non dll-interface class used as base for dll-interface class */ | ||
#pragma warning(disable : 4251) /* disable: C4251: class needs to have dll-interface to be used by clients of class */ | ||
#ifdef WIN32 | ||
#define LRS_EXTENSION_API __declspec(dllexport) | ||
#else | ||
#define LRS_EXTENSION_API | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,67 +1,67 @@ | ||
// License: Apache 2.0. See LICENSE file in root directory. | ||
// Copyright(c) 2021 Intel Corporation. All Rights Reserved. | ||
|
||
#pragma once | ||
|
||
#include "small-heap.h" | ||
|
||
#include <chrono> | ||
|
||
|
||
namespace librealsense { | ||
|
||
|
||
struct callback_invocation | ||
{ | ||
std::chrono::high_resolution_clock::time_point started; | ||
std::chrono::high_resolution_clock::time_point ended; | ||
}; | ||
|
||
typedef small_heap< callback_invocation, 1 > callbacks_heap; | ||
|
||
struct callback_invocation_holder | ||
{ | ||
callback_invocation_holder() | ||
: invocation( nullptr ) | ||
, owner( nullptr ) | ||
{ | ||
} | ||
callback_invocation_holder( const callback_invocation_holder & ) = delete; | ||
callback_invocation_holder & operator=( const callback_invocation_holder & ) = delete; | ||
|
||
callback_invocation_holder( callback_invocation_holder && other ) | ||
: invocation( other.invocation ) | ||
, owner( other.owner ) | ||
{ | ||
other.invocation = nullptr; | ||
} | ||
|
||
callback_invocation_holder( callback_invocation * invocation, callbacks_heap * owner ) | ||
: invocation( invocation ) | ||
, owner( owner ) | ||
{ | ||
} | ||
|
||
~callback_invocation_holder() | ||
{ | ||
if( invocation ) | ||
owner->deallocate( invocation ); | ||
} | ||
|
||
callback_invocation_holder & operator=( callback_invocation_holder && other ) | ||
{ | ||
invocation = other.invocation; | ||
owner = other.owner; | ||
other.invocation = nullptr; | ||
return *this; | ||
} | ||
|
||
operator bool() { return invocation != nullptr; } | ||
|
||
private: | ||
callback_invocation * invocation; | ||
callbacks_heap * owner; | ||
}; | ||
|
||
|
||
} // namespace librealsense | ||
// License: Apache 2.0. See LICENSE file in root directory. | ||
// Copyright(c) 2021 Intel Corporation. All Rights Reserved. | ||
|
||
#pragma once | ||
|
||
#include "small-heap.h" | ||
|
||
#include <chrono> | ||
|
||
|
||
namespace librealsense { | ||
|
||
|
||
struct callback_invocation | ||
{ | ||
std::chrono::high_resolution_clock::time_point started; | ||
std::chrono::high_resolution_clock::time_point ended; | ||
}; | ||
|
||
typedef small_heap< callback_invocation, 1 > callbacks_heap; | ||
|
||
struct callback_invocation_holder | ||
{ | ||
callback_invocation_holder() | ||
: invocation( nullptr ) | ||
, owner( nullptr ) | ||
{ | ||
} | ||
callback_invocation_holder( const callback_invocation_holder & ) = delete; | ||
callback_invocation_holder & operator=( const callback_invocation_holder & ) = delete; | ||
|
||
callback_invocation_holder( callback_invocation_holder && other ) | ||
: invocation( other.invocation ) | ||
, owner( other.owner ) | ||
{ | ||
other.invocation = nullptr; | ||
} | ||
|
||
callback_invocation_holder( callback_invocation * invocation, callbacks_heap * owner ) | ||
: invocation( invocation ) | ||
, owner( owner ) | ||
{ | ||
} | ||
|
||
~callback_invocation_holder() | ||
{ | ||
if( invocation ) | ||
owner->deallocate( invocation ); | ||
} | ||
|
||
callback_invocation_holder & operator=( callback_invocation_holder && other ) | ||
{ | ||
invocation = other.invocation; | ||
owner = other.owner; | ||
other.invocation = nullptr; | ||
return *this; | ||
} | ||
|
||
operator bool() { return invocation != nullptr; } | ||
|
||
private: | ||
callback_invocation * invocation; | ||
callbacks_heap * owner; | ||
}; | ||
|
||
|
||
} // namespace librealsense |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.