Skip to content

Commit 8cb72a7

Browse files
committed
[Core] Minor optimisation
1 parent c6ab584 commit 8cb72a7

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/core/lib_filesystem.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1270,7 +1270,7 @@ ERR findfile(std::string &Path)
12701270

12711271
auto len = Path.find_last_of(":/\\");
12721272
auto folder = (len IS std::string::npos) ? "" : Path.substr(0, len);
1273-
auto name = (len IS std::string::npos) ? Path : Path.substr(len+1);
1273+
auto name = (len IS std::string::npos) ? std::string_view(Path) : std::string_view(Path.c_str() + len + 1);
12741274

12751275
// Scan the files at the Path to find a similar filename (ignore the filename extension).
12761276

src/vector/vector.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ class filter_bitmap {
284284

285285
};
286286

287-
#define TB_NOISE 1
287+
constexpr LONG TB_NOISE = 1;
288288

289289
#include <parasol/modules/vector.h>
290290

@@ -297,7 +297,7 @@ class FeedbackSubscription {
297297

298298
//********************************************************************************************************************
299299

300-
#define MAX_TRANSITION_STOPS 10
300+
constexpr LONG MAX_TRANSITION_STOPS = 10;
301301

302302
struct TransitionStop { // Passed to the Stops field.
303303
DOUBLE Offset;

0 commit comments

Comments
 (0)