Edit syntax - asterisk for pointers, not types

This commit is contained in:
Matúš Púll 2025-06-13 11:35:49 +02:00
parent c162473683
commit 34cc427533
3 changed files with 6 additions and 6 deletions

View file

@ -36,13 +36,13 @@ typedef std::pair<line*, line*> 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<string> *vec, line *l, count_type k, count_type count);

View file

@ -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";

View file

@ -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))