Skip to content

Commit 23b5332

Browse files
committed
Fix errors in vs2013
1 parent 2464325 commit 23b5332

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

src/rpcore/stage_manager.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ struct VisitorInsertToInputBlocks : public boost::static_visitor<>
130130
std::string block_name = block->get_name();
131131
auto found = input_blocks_.find(block_name);
132132
if (found == input_blocks_.end())
133-
input_blocks_.emplace({block_name, block});
133+
input_blocks_.insert({block_name, block});
134134
else
135135
found->second = block;
136136
}
@@ -228,7 +228,7 @@ bool StageManager::Impl::bind_pipes_to_stage(RenderStage* stage)
228228
#if !defined(_MSC_VER) || _MSC_VER >= 1900
229229
previous_pipes_.insert_or_assign(pipe_name, Image::create_2d("Prev-" + pipe_name, 0, 0, tex_format));
230230
#else
231-
previous_pipes_[pipe_name].reset(Image::create_2d("Prev-" + pipe_name, 0, 0, tex_format));
231+
previous_pipes_[pipe_name] = Image::create_2d("Prev-" + pipe_name, 0, 0, tex_format);
232232
#endif
233233
previous_pipes_.at(pipe_name)->clear_image();
234234
}

src/rppanda/actor/actor.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1509,7 +1509,13 @@ void Actor::prepare_bundle(NodePath bundle_np, PandaNode* part_model, const std:
15091509
#if !defined(_MSC_VER) || _MSC_VER >= 1900
15101510
bundle_dict.insert_or_assign(part_name, PartDef{ bundle_np, bundle_handle, part_model });
15111511
#else
1512-
bundle_dict[part_name] = PartDef{ bundle_np, bundle_handle, part_model };
1512+
{
1513+
auto found = bundle_dict.find(part_name);
1514+
if (found == bundle_dict.end())
1515+
bundle_dict.insert({ part_name, PartDef{ bundle_np, bundle_handle, part_model } });
1516+
else
1517+
found->second = PartDef{ bundle_np, bundle_handle, part_model };
1518+
}
15131519
#endif
15141520
}
15151521

0 commit comments

Comments
 (0)