fixing auto-insert of garbage values when adding columns
All checks were successful
Linux arm64 / Build (push) Successful in 37m37s
All checks were successful
Linux arm64 / Build (push) Successful in 37m37s
This commit is contained in:
@@ -37,8 +37,12 @@ void PivotGui::Render() {
|
|||||||
|
|
||||||
ImGui::BeginChild("MatriceInitiale", ImVec2(topLeftWindowSize.x, io.DisplaySize.y * 0.7f), false);
|
ImGui::BeginChild("MatriceInitiale", ImVec2(topLeftWindowSize.x, io.DisplaySize.y * 0.7f), false);
|
||||||
|
|
||||||
// Resize matrixValues
|
// Resize matrixValues and initialize new elements to 0
|
||||||
matrixValues.resize(matrixSizeY, std::vector<int>(matrixSizeX, 0));
|
|
||||||
|
matrixValues.resize(matrixSizeY);
|
||||||
|
for(auto& row : matrixValues) {
|
||||||
|
row.resize(matrixSizeX, 0);
|
||||||
|
}
|
||||||
|
|
||||||
for (int y = 0; y < matrixSizeY; y++) {
|
for (int y = 0; y < matrixSizeY; y++) {
|
||||||
for (int x = 0; x < matrixSizeX; x++) {
|
for (int x = 0; x < matrixSizeX; x++) {
|
||||||
|
|||||||
Reference in New Issue
Block a user