Skip to content

Commit

Permalink
Fixing typos
Browse files Browse the repository at this point in the history
Summary: Fixing some typo found thanks to a spell checker

Reviewed By: georges-berenger

Differential Revision: D59690982

fbshipit-source-id: e25a34863b75e0d7297691ae1bc3d4f5bab12e83
  • Loading branch information
SeaOtocinclus authored and facebook-github-bot committed Jul 12, 2024
1 parent bbbbaab commit e70fb03
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 9 deletions.
6 changes: 3 additions & 3 deletions vrs/DataLayout.h
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ class DataLayout {
vector<int8_t>& getFixedData() {
return fixedData_;
}
/// To access the buffer for variable-size DataPices. No need for a const version.
/// To access the buffer for variable-size DataPieces. No need for a const version.
/// @internal
vector<int8_t>& getVarData() {
return varData_;
Expand Down Expand Up @@ -582,7 +582,7 @@ class ManualDataLayout : public DataLayout {
};

/// \brief Helper class to include DataLayout structs containing a set of DataPieceXXX and
/// DataLayoutStruct while preserving the required unicity of the field names. Embedded DataPiece
/// DataLayoutStruct while preserving the required uniqueness of the field names. Embedded DataPiece
/// objects will have a name automatically prefixed with the name of the DataLayoutStruct, with a
/// '/' in between.
///
Expand Down Expand Up @@ -632,7 +632,7 @@ struct DataLayoutStruct {
}

/// \brief Helper class to include DataLayout structs containing a sliced array of DataPieceXXX and
/// DataLayoutStruct while preserving the required unicity of the field names. Embedded DataPiece
/// DataLayoutStruct while preserving the required uniqueness of the field names. Embedded DataPiece
/// objects will have a name automatically prefixed with the name of the DataLayoutStruct, with a
/// '/0'... /Size-1' in between.
///
Expand Down
5 changes: 3 additions & 2 deletions vrs/FileFormat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ void FileHeader::init(uint32_t magic1, uint32_t magic2, uint32_t magic3, uint32_
// Most nanosecond implementations don't return values with nanosecond precision,
// so we override the 30 lsb (~1s) with random bits.
// creationId is now an approximate number of ns since Unix EPOCH, with 30 bits guaranteed random.
// Note: this is not perfect unicity, but good enough to avoid collisions in a local file cache.
// Note: this is not perfect uniqueness, but good enough to avoid collisions in a local file
// cache.
random_device rd;
mt19937_64 engine(rd());
uniform_int_distribution<uint32_t> distribution;
Expand Down Expand Up @@ -253,7 +254,7 @@ bool printVRSFileInternals(FileHandler& file) {
fileHeader.fileHeaderSize.get() + descriptionRecordHeader.recordSize.get();
cout << "anticipated at " << indexRecordOffset << ", after the description record.\n";
} else {
cout << "NOT after the decription record. Not great for streaming.\n";
cout << "NOT after the description record. Not great for streaming.\n";
}
}

Expand Down
2 changes: 1 addition & 1 deletion vrs/FileSpec.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ struct FileSpec {
// "filename":"file.vrs"}.
string toJson() const;

/// Parse the uri field already set, overwritting other fields on success.
/// Parse the uri field already set, overwriting other fields on success.
int parseUri();

/// Tell if we have chunks and all of them has a file size.
Expand Down
4 changes: 2 additions & 2 deletions vrs/RecordFileReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -179,10 +179,10 @@ bool RecordFileReader::isVrsFile(const string& filePath) {
}

// Log progress & bail, if user cancelled
#define LOG_PROGRESS(operation__, error__, messageLamba__) \
#define LOG_PROGRESS(operation__, error__, messageLambda__) \
do { \
openProgressLogger_->setDetailedProgress(file_->showProgress()); \
if (!openProgressLogger_->logNewStep(messageLamba__())) { \
if (!openProgressLogger_->logNewStep(messageLambda__())) { \
closeFile(); \
XR_LOGW("Open cancelled"); \
return OPERATION_CANCELLED; \
Expand Down
2 changes: 1 addition & 1 deletion vrs/WriteFileHandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ class WriteFileHandler : public FileHandler {
/// @param buffer: a pointer to the data bytes to write.
/// @param length: the number of bytes to write.
/// @return A status code, 0 meaning success.
/// In case of error, you can use getLastRWSize() to know how many bytes were really writen.
/// In case of error, you can use getLastRWSize() to know how many bytes were really written.
virtual int write(const void* buffer, size_t length) = 0;
/// Helper for trivially copyable objects.
template <typename T, std::enable_if_t<std::is_trivially_copyable<T>::value, int> = 0>
Expand Down

0 comments on commit e70fb03

Please sign in to comment.