Skip to content

Commit

Permalink
Fix warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Lecrapouille committed May 28, 2024
1 parent 29278ee commit 78ca0f6
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion src/Editor/DearImGui/Backends/GLFW3/Application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ void Application::run()
{
// For the display framerate
double now = glfwGetTime();
double deltaTime = now - m_lastUpdateTime;
//double deltaTime = now - m_lastUpdateTime;

// Poll events like key presses, mouse movements etc.
glfwPollEvents();
Expand Down
10 changes: 5 additions & 5 deletions src/Editor/DearImGui/Backends/RayLib/Application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,11 @@ Application::~Application()
}

//------------------------------------------------------------------------------
static uint64_t timeSinceEpochMillisec()
{
using namespace std::chrono;
return duration_cast<milliseconds>(system_clock::now().time_since_epoch()).count();
}
//static uint64_t timeSinceEpochMillisec()
//{
// using namespace std::chrono;
// return duration_cast<milliseconds>(system_clock::now().time_since_epoch()).count();
//}

//------------------------------------------------------------------------------
void Application::run()
Expand Down
2 changes: 1 addition & 1 deletion src/Editor/DearImGui/Editor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,7 @@ void Editor::showCounterOrDaterEquation() const
{
static bool use_caption = false;
static bool tropical_notation = false;
static bool show_matrix = false;
//static bool show_matrix = false;

ImGui::OpenPopup("Counter or dater equations");
ImGui::SetNextWindowPos(m_states.viewport_center, ImGuiCond_Appearing,
Expand Down
16 changes: 8 additions & 8 deletions src/Net/Imports/ImportFlowshop.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ std::string importFlowshop(Net& net, std::string const& filename)
}

// Extract number of transitions and number of lines
size_t transitions, lines, rows;
size_t lines, rows;
std::string type;

if (!(file >> type >> rows >> lines))
Expand Down Expand Up @@ -128,7 +128,7 @@ std::string importFlowshop(Net& net, std::string const& filename)

if (value != "nan")
{
net.addPlace(id, Transition::to_str(id), x, y, 0);
net.addPlace(id, Transition::to_str(id), float(x), float(y), 0);
id++;
}
x += dx;
Expand All @@ -144,23 +144,23 @@ std::string importFlowshop(Net& net, std::string const& filename)
y += dy;
}

float ymax = y;
float xmax = margin + dx + dx * rows;
//float ymax = float(y);
//float xmax = float(margin + dx + dx * rows);

// Place this code outside the getline() loop to have id of internal transitions
// starting from 0.
x = margin + dx - dx / 2.0f; y = margin;
x = margin + dx - dx / 2u; y = margin;
for (const auto& columnName : matrix.columnNames)
{
net.addPlace(id++, columnName, x, y, 0);
net.addPlace(id++, columnName, float(x), float(y), 0);
//net.addPlace(id++, columnName, x, ymax, 0);
x += dx;
}

x = margin; y = margin + dy + dy / 2.0f;
x = margin; y = margin + dy + dy / 2u;
for (const auto& rowName : matrix.rowNames)
{
net.addPlace(id++, rowName, x, y, 0);
net.addPlace(id++, rowName, float(x), float(y), 0);
//net.addPlace(id++, rowName, xmax, y, 0);
y += dy;
}
Expand Down
4 changes: 2 additions & 2 deletions src/Net/Receptivities.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ bool Receptivity::VariableExp::evaluate() const
return Sensors::instance().get(m_name);
}
catch (...) {
assert("Unkown variable");
assert(false && "Unkown variable");
return false;
}
}
Expand All @@ -60,7 +60,7 @@ Receptivity::ConstExp::ConstExp(std::string const& operand)
} else if (operand == "false") {
m_operand = false;
} else {
assert("Unkown const operand");
assert(false && "Unkown const operand");
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/Utils/History.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ void History::addUndo(History::Action::Ptr action)
m_undoList.pop_front();
}
m_undoList.push_back(std::move(action));
if ((m_nCleanCount < 0u) && (m_redoList.size() > 0u))
if (m_redoList.size() > 0u)
{
m_nCleanCount = m_undoList.size() + m_redoList.size() + 1u;
}
Expand Down
2 changes: 1 addition & 1 deletion src/Utils/Path.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ class Path
//! Beware of race condition: even if found the file may have suppress after
//! this function has been called.
//--------------------------------------------------------------------------
std::string expand(std::string const& filename) const;
std::string expand(std::string const& filename) const; // FIXME retourner pair<string,RD/WR>

//--------------------------------------------------------------------------
//! \brief Return the container of path
Expand Down

0 comments on commit 78ca0f6

Please sign in to comment.