From 34cc42753302713cf9db256c08568d592e9e947e Mon Sep 17 00:00:00 2001 From: Matuush Date: Fri, 13 Jun 2025 11:35:49 +0200 Subject: [PATCH] Edit syntax - asterisk for pointers, not types --- everything.hpp | 6 +++--- main.cpp | 2 +- treap.cpp | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/everything.hpp b/everything.hpp index 5f86413..249ce66 100644 --- a/everything.hpp +++ b/everything.hpp @@ -36,13 +36,13 @@ typedef std::pair two_lines; // Treap data structure class Treap { - line* root; + line *root; - count_type get_size(line* l); two_lines split(line *l, count_type k); - line* join(line *a, line *b); line* join(two_lines two) { return join(two.first, two.second); } + + count_type get_size(line *l); line* find(line *l, count_type k); line* find(count_type k); count_type bulk_find(vector *vec, line *l, count_type k, count_type count); diff --git a/main.cpp b/main.cpp index e0bbb6f..eea38d2 100644 --- a/main.cpp +++ b/main.cpp @@ -32,7 +32,7 @@ count_type get_tab_offset(count_type c, string text) { -int main(int argc, char* argv[]) { +int main(int argc, const char *argv[]) { // Check argument if(argc <= 1) { std::cerr << "No input filename\n"; diff --git a/treap.cpp b/treap.cpp index 46fd65d..9ed12d6 100644 --- a/treap.cpp +++ b/treap.cpp @@ -1,7 +1,7 @@ #include "everything.hpp" // Get size uf a subtreap -count_type Treap::get_size(line* l) { +count_type Treap::get_size(line *l) { if(l == nullptr) return 0; return l->size; } @@ -44,7 +44,7 @@ line* Treap::join(line *a, line *b) { } // Find k-th line of file -line* Treap::find(line* l, count_type k) { +line* Treap::find(line *l, count_type k) { if(l == nullptr) return nullptr; if(k <= get_size(l->left))