Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Path scale for windows build (MSVC 16 2019) #8

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions include/scale/scale_decoder_stream.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include <array>
#include <iterator>
#include <optional>
#include <deque>

#include <boost/variant.hpp>
#include <gsl/span>
Expand Down
5 changes: 5 additions & 0 deletions include/scale/scale_encoder_stream.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@
#ifndef SCALE_CORE_SCALE_SCALE_ENCODER_STREAM_HPP
#define SCALE_CORE_SCALE_SCALE_ENCODER_STREAM_HPP

#if defined(_MSC_VER)
#include <BaseTsd.h>
typedef SSIZE_T ssize_t;
#endif

#include <deque>
#include <optional>

Expand Down
2 changes: 1 addition & 1 deletion src/encode_append.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ namespace scale {

outcome::result<void> append_or_new_vec(std::vector<uint8_t> &self_encoded,
gsl::span<const uint8_t> input) {
EncodeOpaqueValue opaque_value{.v = input};
EncodeOpaqueValue opaque_value{input};

// No data present, just encode the given input data.
if (self_encoded.empty()) {
Expand Down
2 changes: 1 addition & 1 deletion src/scale_decoder_stream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ namespace scale {
}

uint8_t ScaleDecoderStream::nextByte() {
if (not hasMore(1)) {
if (!hasMore(1)) {
raise(DecodeError::NOT_ENOUGH_DATA);
}
++current_index_;
Expand Down
2 changes: 1 addition & 1 deletion src/scale_encoder_stream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ namespace scale {

ScaleEncoderStream &ScaleEncoderStream::putByte(uint8_t v) {
++bytes_written_;
if (not drop_data_) {
if (!drop_data_) {
stream_.push_back(v);
}
return *this;
Expand Down
6 changes: 3 additions & 3 deletions test/util/outcome.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@

#define _ASSERT_OUTCOME_SUCCESS_TRY(_result_, _expression_) \
auto &&_result_ = (_expression_); \
if (not(_result_).has_value()) { \
if (!(_result_).has_value()) { \
GTEST_FATAL_FAILURE_("Outcome of: " #_expression_) \
<< " Actual: Error '" << _result_.error().message() << "'\n" \
<< "Expected: Success"; \
Expand All @@ -147,7 +147,7 @@
#define ASSERT_OUTCOME_SOME_ERROR(_expression_) \
{ \
auto &&result = (_expression_); \
if (not result.has_error()) { \
if (!result.has_error()) { \
GTEST_FATAL_FAILURE_("Outcome of: " #_expression_) \
<< " Actual: Success\n" \
<< "Expected: Some error"; \
Expand Down Expand Up @@ -182,7 +182,7 @@

#define EXPECT_OUTCOME_SOME_ERROR(_result_, _expression_) \
[[maybe_unused]] auto &&_result_ = (_expression_); \
if (not _result_.has_error()) { \
if (!_result_.has_error()) { \
GTEST_NONFATAL_FAILURE_("Outcome of: " #_expression_) \
<< " Actual: Success\n" \
<< "Expected: Some error"; \
Expand Down