Skip to content

Commit 0dd4f8d

Browse files
committed
minor fixes
1 parent a93bd35 commit 0dd4f8d

File tree

7 files changed

+7
-7
lines changed

7 files changed

+7
-7
lines changed

include/utility.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -740,7 +740,7 @@ template <class SH_CORE> struct TSeqVar : public SHVar {
740740
SHVar *begin() { return data(); }
741741
SHVar *end() { return data() + size(); }
742742

743-
void resize(size_t nsize) { SH_CORE::seqResize(&payload.seqValue, nsize); }
743+
void resize(size_t nsize) { SH_CORE::seqResize(&payload.seqValue, uint32_t(nsize)); }
744744

745745
void push_back(const SHVar &value) {
746746
resize(size() + 1);

src/core/foundation.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1346,7 +1346,7 @@ struct VarStringStream {
13461346
stream << "0x" << std::hex;
13471347
auto len = var.payload.stringLen;
13481348
if (len == 0 && var.payload.stringValue) {
1349-
len = strlen(var.payload.stringValue);
1349+
len = uint32_t(strlen(var.payload.stringValue));
13501350
}
13511351
for (uint32_t i = 0; i < len; i++)
13521352
stream << std::setw(2) << std::setfill('0') << (int)var.payload.stringValue[i];

src/core/runtime.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1079,7 +1079,7 @@ struct Serialization {
10791079
SHString k;
10801080
SHVar v;
10811081
while (t.api->tableNext(t, &tit, &k, &v)) {
1082-
uint32_t klen = strlen(k);
1082+
auto klen = uint32_t(strlen(k));
10831083
write((const uint8_t *)&klen, sizeof(uint32_t));
10841084
total += sizeof(uint32_t);
10851085
write((const uint8_t *)k, klen);

src/core/shards/casting.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ struct FromImage {
1919
if (input.valueType != SHType::Image)
2020
throw ActivationError("Expected Image type.");
2121

22-
auto pixsize = getPixelSize(input);
22+
int pixsize = int(getPixelSize(input));
2323

2424
const int w = int(input.payload.imageValue.width);
2525
const int h = int(input.payload.imageValue.height);

src/core/shards/channels.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ struct BufferedConsumer {
201201
SHVar res{};
202202
res.valueType = SHType::Seq;
203203
res.payload.seqValue.elements = &buffer[0];
204-
res.payload.seqValue.len = buffer.size();
204+
res.payload.seqValue.len = uint32_t(buffer.size());
205205
return res;
206206
} else {
207207
return buffer[0];

src/gfx/pipeline_step.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ typedef std::variant<ClearStep, RenderDrawablesStep, RenderFullscreenStep> Pipel
138138
typedef std::shared_ptr<PipelineStep> PipelineStepPtr;
139139
typedef boost::container::small_vector<PipelineStepPtr, 8> PipelineSteps;
140140

141-
template <typename T> PipelineStepPtr makePipelineStep(T &&step) { return std::make_shared<PipelineStep>(std::move(step)); }
141+
template <typename T> PipelineStepPtr makePipelineStep(T &&step) { return std::make_shared<PipelineStep>(std::forward<T>(step)); }
142142
} // namespace gfx
143143

144144
#endif /* D251FF97_80A2_4ACD_856B_0D3A776BB7A7 */

src/gfx/shader/entry_point.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ struct EntryPoint {
3434
template <typename T>
3535
EntryPoint(const std::string &name, ProgrammableGraphicsStage stage = ProgrammableGraphicsStage::Fragment,
3636
T &&code = BlockPtr())
37-
: stage(stage), name(name), code(blocks::ConvertToBlock<T>{}(std::move(code))) {}
37+
: stage(stage), name(name), code(blocks::ConvertToBlock<T>{}(std::forward<T>(code))) {}
3838

3939
EntryPoint(EntryPoint &&other) = default;
4040
EntryPoint &operator=(EntryPoint &&other) = default;

0 commit comments

Comments
 (0)