Skip to content

Commit

Permalink
Fix function return types and remove unused variable
Browse files Browse the repository at this point in the history
  • Loading branch information
janjurca committed Jan 17, 2024
1 parent 0e3fec1 commit 771a811
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions include/filestorm/filetree.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ class FileTree {

Node* getRoot() const;

const int getDirectoryCount() const { return directory_count; }
const int getFileCount() const { return file_count; }
int getDirectoryCount() const { return directory_count; }
int getFileCount() const { return file_count; }

private:
void printRec(const Node* node, int depth) const;
Expand Down
3 changes: 1 addition & 2 deletions include/filestorm/utils/psm.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class Transition {

class ProbabilisticStateMachine {
public:
ProbabilisticStateMachine(std::map<std::string, State>& states, std::map<std::string, Transition>& transitions, State& init) : _states(states), _transitions(transitions), _currentState(init) {}
ProbabilisticStateMachine(std::map<std::string, Transition>& transitions, State& init) : _transitions(transitions), _currentState(init) {}

void performTransition() {
// Choose a transition based on probabilities
Expand All @@ -58,6 +58,5 @@ class ProbabilisticStateMachine {

private:
State& _currentState;
std::map<std::string, State>& _states;
std::map<std::string, Transition>& _transitions;
};
2 changes: 1 addition & 1 deletion source/scenarios/aging.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ void AgingScenario::run() {
int iteration = 0;
progressbar bar(getParameter("iterations").get_int());

ProbabilisticStateMachine psm(states, transtions, states.at("S"));
ProbabilisticStateMachine psm(transtions, states.at("S"));

while (iteration < getParameter("iterations").get_int()) {
bar.update();
Expand Down

0 comments on commit 771a811

Please sign in to comment.