Skip to content

Commit

Permalink
Remove scoped_ptr
Browse files Browse the repository at this point in the history
  • Loading branch information
kaidokert committed Jul 16, 2023
1 parent c757b34 commit a0b624e
Show file tree
Hide file tree
Showing 14 changed files with 5 additions and 18 deletions.
1 change: 0 additions & 1 deletion starboard/elf_loader/elf_loader_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

#include "starboard/elf_loader/elf_loader_impl.h"

#include "starboard/common/scoped_ptr.h"
#include "testing/gtest/include/gtest/gtest.h"

#if SB_CAN(MAP_EXECUTABLE_MEMORY)
Expand Down
1 change: 0 additions & 1 deletion starboard/elf_loader/program_table_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
#include <string>
#include <vector>

#include "starboard/common/scoped_ptr.h"
#include "starboard/elf_loader/file.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
Expand Down
1 change: 0 additions & 1 deletion starboard/elf_loader/relocations_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

#include "starboard/elf_loader/relocations.h"

#include "starboard/common/scoped_ptr.h"
#include "starboard/elf_loader/elf.h"
#include "starboard/elf_loader/file_impl.h"
#include "starboard/string.h"
Expand Down
5 changes: 2 additions & 3 deletions starboard/nplb/align_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,18 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#include "starboard/common/scoped_ptr.h"
#include "starboard/configuration.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace starboard {
namespace nplb {
namespace {

bool IsAligned(void *pointer, size_t alignment) {
bool IsAligned(void* pointer, size_t alignment) {
return (reinterpret_cast<uintptr_t>(pointer) % alignment) == 0;
}

size_t GetAlignment(void *pointer) {
size_t GetAlignment(void* pointer) {
for (size_t alignment = static_cast<size_t>(1) << ((sizeof(size_t) * 8) - 1);
alignment != 0; alignment /= 2) {
if (IsAligned(pointer, alignment)) {
Expand Down
1 change: 0 additions & 1 deletion starboard/nplb/player_test_fixture.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
#include <vector>

#include "starboard/common/queue.h"
#include "starboard/common/scoped_ptr.h"
#include "starboard/drm.h"
#include "starboard/nplb/player_test_util.h"
#include "starboard/player.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
#include <string>

#include "starboard/common/mutex.h"
#include "starboard/common/scoped_ptr.h"
#include "starboard/configuration_constants.h"
#include "starboard/shared/starboard/media/media_support_internal.h"
#include "starboard/shared/starboard/player/filter/audio_decoder_internal.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
#include <string>

#include "starboard/common/ref_counted.h"
#include "starboard/common/scoped_ptr.h"
#include "starboard/shared/starboard/player/decoded_audio_internal.h"
#include "testing/gtest/include/gtest/gtest.h"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
#include "starboard/common/media.h"
#include "starboard/common/mutex.h"
#include "starboard/common/ref_counted.h"
#include "starboard/common/scoped_ptr.h"
#include "starboard/configuration_constants.h"
#include "starboard/media.h"
#include "starboard/memory.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#include <set>

#include "starboard/common/log.h"
#include "starboard/common/scoped_ptr.h"
#include "starboard/media.h"
#include "starboard/memory.h"
#include "starboard/shared/starboard/media/media_util.h"
Expand Down Expand Up @@ -115,8 +114,8 @@ class AudioRendererTest : public ::testing::Test {
const int kMaxCachedFrames = 256 * 1024;
const int kMaxFramesPerAppend = 16384;
audio_renderer_.reset(new AudioRendererPcm(
make_scoped_ptr<AudioDecoder>(audio_decoder_),
make_scoped_ptr<AudioRendererSink>(audio_renderer_sink_),
std::make_unique<AudioDecoder>(audio_decoder_),
std::make_unique<AudioRendererSink>(audio_renderer_sink_),
GetDefaultAudioStreamInfo(), kMaxCachedFrames, kMaxFramesPerAppend));
audio_renderer_->Initialize(
std::bind(&AudioRendererTest::OnError, this),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ class MediaTimeProviderImplTest : public ::testing::Test {
// is passed to and owned by |media_time_provider_impl_|, so the tests
// can adjust expectation on it. This is safe in the context of the
// tests.
media_time_provider_impl_(make_scoped_ptr<MonotonicSystemTimeProvider>(
media_time_provider_impl_(std::make_unique<MonotonicSystemTimeProvider>(
system_time_provider_)) {
media_time_provider_impl_.SetPlaybackRate(1.0);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
#include <string>
#include <vector>

#include "starboard/common/scoped_ptr.h"
#include "starboard/common/string.h"
#include "starboard/media.h"
#include "starboard/player.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@

#include "starboard/common/condition_variable.h"
#include "starboard/common/mutex.h"
#include "starboard/common/scoped_ptr.h"
#include "starboard/common/string.h"
#include "starboard/configuration_constants.h"
#include "starboard/drm.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@

#include "starboard/common/condition_variable.h"
#include "starboard/common/mutex.h"
#include "starboard/common/scoped_ptr.h"
#include "starboard/common/string.h"
#include "starboard/configuration_constants.h"
#include "starboard/drm.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@

#include "starboard/common/condition_variable.h"
#include "starboard/common/mutex.h"
#include "starboard/common/scoped_ptr.h"
#include "starboard/common/string.h"
#include "starboard/configuration_constants.h"
#include "starboard/drm.h"
Expand Down

0 comments on commit a0b624e

Please sign in to comment.