Skip to content

Commit

Permalink
Replace gsl with std
Browse files Browse the repository at this point in the history
  • Loading branch information
j9liu committed Nov 21, 2024
1 parent 4fd947a commit d268303
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 22 deletions.
34 changes: 17 additions & 17 deletions native~/Runtime/src/TestGltfModelImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ TestGltfModelImpl::AddBooleanPropertyTableProperty(
property,
classProperty,
size,
gsl::span<const std::byte>(
std::span<const std::byte>(
buffer.cesium.data.data(),
buffer.cesium.data.size()));

Expand Down Expand Up @@ -221,7 +221,7 @@ TestGltfModelImpl::AddIntPropertyTableProperty(
property,
classProperty,
size,
gsl::span<const std::byte>(
std::span<const std::byte>(
buffer.cesium.data.data(),
buffer.cesium.data.size()));

Expand All @@ -233,7 +233,7 @@ TestGltfModelImpl::AddIntPropertyTableProperty(
property,
classProperty,
size,
gsl::span<const std::byte>(
std::span<const std::byte>(
buffer.cesium.data.data(),
buffer.cesium.data.size()));

Expand Down Expand Up @@ -265,7 +265,7 @@ TestGltfModelImpl::AddDoublePropertyTableProperty(
property,
classProperty,
size,
gsl::span<const std::byte>(
std::span<const std::byte>(
buffer.cesium.data.data(),
buffer.cesium.data.size()));

Expand Down Expand Up @@ -298,7 +298,7 @@ TestGltfModelImpl::AddVec2PropertyTableProperty(
property,
classProperty,
size,
gsl::span<const std::byte>(
std::span<const std::byte>(
buffer.cesium.data.data(),
buffer.cesium.data.size()));

Expand Down Expand Up @@ -331,7 +331,7 @@ TestGltfModelImpl::AddVec3PropertyTableProperty(
property,
classProperty,
size,
gsl::span<const std::byte>(
std::span<const std::byte>(
buffer.cesium.data.data(),
buffer.cesium.data.size()));

Expand Down Expand Up @@ -368,7 +368,7 @@ TestGltfModelImpl::AddVec4PropertyTableProperty(
property,
classProperty,
size,
gsl::span<const std::byte>(
std::span<const std::byte>(
buffer.cesium.data.data(),
buffer.cesium.data.size()));

Expand Down Expand Up @@ -406,7 +406,7 @@ TestGltfModelImpl::AddMat2PropertyTableProperty(
property,
classProperty,
size,
gsl::span<const std::byte>(
std::span<const std::byte>(
buffer.cesium.data.data(),
buffer.cesium.data.size()));

Expand Down Expand Up @@ -445,7 +445,7 @@ TestGltfModelImpl::AddMat3PropertyTableProperty(
property,
classProperty,
size,
gsl::span<const std::byte>(
std::span<const std::byte>(
buffer.cesium.data.data(),
buffer.cesium.data.size()));

Expand Down Expand Up @@ -485,7 +485,7 @@ TestGltfModelImpl::AddMat4PropertyTableProperty(
property,
classProperty,
size,
gsl::span<const std::byte>(
std::span<const std::byte>(
buffer.cesium.data.data(),
buffer.cesium.data.size()));

Expand Down Expand Up @@ -545,11 +545,11 @@ TestGltfModelImpl::AddStringPropertyTableProperty(
property,
classProperty,
size,
gsl::span<const std::byte>(
std::span<const std::byte>(
stringBuffer.cesium.data.data(),
stringBuffer.cesium.data.size()),
gsl::span<const std::byte>(),
gsl::span<const std::byte>(
std::span<const std::byte>(),
std::span<const std::byte>(
offsetBuffer.cesium.data.data(),
offsetBuffer.cesium.data.size()),
CesiumGltf::PropertyComponentType::None,
Expand Down Expand Up @@ -588,7 +588,7 @@ TestGltfModelImpl::AddFixedLengthArrayPropertyTableProperty(
property,
classProperty,
numValues / count,
gsl::span<const std::byte>(
std::span<const std::byte>(
buffer.cesium.data.data(),
buffer.cesium.data.size()));

Expand Down Expand Up @@ -642,13 +642,13 @@ TestGltfModelImpl::AddVariableLengthArrayPropertyTableProperty(
property,
classProperty,
size,
gsl::span<const std::byte>(
std::span<const std::byte>(
buffer.cesium.data.data(),
buffer.cesium.data.size()),
gsl::span<const std::byte>(
std::span<const std::byte>(
offsetBuffer.cesium.data.data(),
offsetBuffer.cesium.data.size()),
gsl::span<const std::byte>(),
std::span<const std::byte>(),
CesiumGltf::PropertyComponentType::Uint16,
CesiumGltf::PropertyComponentType::None);

Expand Down
2 changes: 1 addition & 1 deletion native~/Shared/src/NativeDownloadHandlerImpl.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#include "CesiumImpl.h"

#include <gsl/span>
#include <span>

#include <cstddef>
#include <cstdint>
Expand Down
4 changes: 2 additions & 2 deletions native~/Shared/src/UnityAssetAccessor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ class UnityAssetResponse : public IAssetResponse {

virtual const HttpHeaders& headers() const override { return _headers; }

virtual gsl::span<const std::byte> data() const override {
virtual std::span<const std::byte> data() const override {
return this->_data;
}

Expand Down Expand Up @@ -202,7 +202,7 @@ UnityAssetAccessor::request(
const std::string& verb,
const std::string& url,
const std::vector<THeader>& headers,
const gsl::span<const std::byte>& contentPayload) {
const std::span<const std::byte>& contentPayload) {
if (contentPayload.size() >
size_t(std::numeric_limits<std::int32_t>::max())) {
// This implementation cannot be used to send more than 2 gigabytes - just
Expand Down
2 changes: 1 addition & 1 deletion native~/Shared/src/UnityAssetAccessor.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class UnityAssetAccessor : public CesiumAsync::IAssetAccessor {
const std::string& verb,
const std::string& url,
const std::vector<THeader>& headers = std::vector<THeader>(),
const gsl::span<const std::byte>& contentPayload = {}) override;
const std::span<const std::byte>& contentPayload = {}) override;

virtual void tick() noexcept override;

Expand Down
2 changes: 1 addition & 1 deletion native~/extern/cesium-native
Submodule cesium-native updated 367 files

0 comments on commit d268303

Please sign in to comment.