Skip to content

Commit

Permalink
Fix Linux build problems
Browse files Browse the repository at this point in the history
  • Loading branch information
dedmen committed Feb 27, 2019
1 parent b17fcaf commit 361f830
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/EngineProfiling.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ extern "C" {

if (sdp.content.length() < 64 || !x || !*x || x->get()->size() < 16) return;

r_string name = getScriptName(sdp.content, sdp.sourcefile, 32);
r_string name(getScriptName(sdp.content, sdp.sourcefile, 32));
if (!name.empty() && name != "<unknown>"sv)
addScopeInstruction(*x, name);
}
Expand Down
2 changes: 1 addition & 1 deletion src/SignalSlot.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class Signal<ReturnType(Args...)> {
std::vector<ReturnType> emit(Args... args) const {
std::vector<ReturnType> returnData;
if (slots.empty())
return;
return {};
for (auto& slot : slots) {
returnData.push_back(slot(args...));
}
Expand Down
4 changes: 3 additions & 1 deletion src/scriptProfiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@
#endif
#include "ProfilerAdapter.hpp"
#include "AdapterArmaDiag.hpp"
#ifdef WITH_BROFILER
#include "AdapterBrofiler.hpp"
#include "Event.h"
#endif
#include "AdapterChrome.hpp"
#include "AdapterTracy.hpp"
#include <memory>
Expand Down Expand Up @@ -669,7 +671,7 @@ game_value compileRedirect2(game_state& state, game_value_parameter message) {

auto& funcPath = bodyCode->instructions->front()->sdp.sourcefile;
//#TODO pass instructions to getScriptName and check if there is a "scriptName" or "scopeName" unary command call
r_string scriptName = getScriptName(str, funcPath, 32);
r_string scriptName(getScriptName(str, funcPath, 32));

//if (scriptName.empty()) scriptName = "<unknown>";

Expand Down

0 comments on commit 361f830

Please sign in to comment.