Skip to content

Commit 361f830

Browse files
committed
Fix Linux build problems
1 parent b17fcaf commit 361f830

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

src/EngineProfiling.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ extern "C" {
5252

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

55-
r_string name = getScriptName(sdp.content, sdp.sourcefile, 32);
55+
r_string name(getScriptName(sdp.content, sdp.sourcefile, 32));
5656
if (!name.empty() && name != "<unknown>"sv)
5757
addScopeInstruction(*x, name);
5858
}

src/SignalSlot.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class Signal<ReturnType(Args...)> {
2121
std::vector<ReturnType> emit(Args... args) const {
2222
std::vector<ReturnType> returnData;
2323
if (slots.empty())
24-
return;
24+
return {};
2525
for (auto& slot : slots) {
2626
returnData.push_back(slot(args...));
2727
}

src/scriptProfiler.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,10 @@
1010
#endif
1111
#include "ProfilerAdapter.hpp"
1212
#include "AdapterArmaDiag.hpp"
13+
#ifdef WITH_BROFILER
1314
#include "AdapterBrofiler.hpp"
1415
#include "Event.h"
16+
#endif
1517
#include "AdapterChrome.hpp"
1618
#include "AdapterTracy.hpp"
1719
#include <memory>
@@ -669,7 +671,7 @@ game_value compileRedirect2(game_state& state, game_value_parameter message) {
669671

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

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

0 commit comments

Comments
 (0)