Skip to content

Commit b313286

Browse files
committed
Fix minor comment issues in vector.h [skip CI].
1 parent 58f4157 commit b313286

File tree

1 file changed

+25
-13
lines changed

1 file changed

+25
-13
lines changed

hilti/runtime/include/types/vector.h

+25-13
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,8 @@ class ConstIterator {
252252

253253
} // namespace vector
254254

255-
/** HILTI's `Vector` is a `std::vector`-like type with additional safety guarantees.
255+
/**
256+
* HILTI's `Vector` is a `std::vector`-like type with additional safety guarantees.
256257
*
257258
* In particular it guarantees that
258259
*
@@ -262,7 +263,7 @@ class ConstIterator {
262263
*
263264
* If not otherwise specified, member functions have the semantics of
264265
* `std::vector` member functions.
265-
* */
266+
*/
266267
template<typename T, typename Allocator>
267268
class Vector : protected std::vector<T, Allocator> {
268269
public:
@@ -289,7 +290,8 @@ class Vector : protected std::vector<T, Allocator> {
289290

290291
~Vector() = default;
291292

292-
/** Returns the last element of the `vector`.
293+
/**
294+
* Returns the first element of the `vector`.
293295
*
294296
* @return a reference to the last element
295297
* @throw `IndexError` if the `Vector` is empty
@@ -301,7 +303,8 @@ class Vector : protected std::vector<T, Allocator> {
301303
return V::front();
302304
}
303305

304-
/** Returns the last element of the `vector`.
306+
/**
307+
* Returns the last element of the `vector`.
305308
*
306309
* @return a reference to the last element
307310
* @throw `IndexError` if the `Vector` is empty
@@ -372,7 +375,8 @@ class Vector : protected std::vector<T, Allocator> {
372375
return v;
373376
}
374377

375-
/** Replaces the contents of this `Vector` with another `Vector`.
378+
/**
379+
* Replaces the contents of this `Vector` with another `Vector`.
376380
*
377381
* In contrast to assignments of `std::vector` iterators remain valid and
378382
* after assignment will point to positions in the assigned vector.
@@ -388,7 +392,8 @@ class Vector : protected std::vector<T, Allocator> {
388392
return *this;
389393
}
390394

391-
/** Replaces the contents of this `Vector` with another `Vector`.
395+
/**
396+
* Replaces the contents of this `Vector` with another `Vector`.
392397
*
393398
* In contrast to assignments of `std::vector` iterators remain valid and
394399
* after assignment will point to positions in the assigned vector.
@@ -401,7 +406,8 @@ class Vector : protected std::vector<T, Allocator> {
401406
return *this;
402407
}
403408

404-
/** Accesses specified element.
409+
/**
410+
* Accesses specified element.
405411
*
406412
* @param i position of the element to return
407413
* @return a reference to the element
@@ -414,7 +420,8 @@ class Vector : protected std::vector<T, Allocator> {
414420
return V::data()[i];
415421
}
416422

417-
/** Accesses specified element.
423+
/**
424+
* Accesses specified element.
418425
*
419426
* @param i position of the element to return
420427
* @return the element
@@ -427,7 +434,8 @@ class Vector : protected std::vector<T, Allocator> {
427434
return V::data()[i];
428435
}
429436

430-
/** Accesses specified element.
437+
/**
438+
* Accesses specified element.
431439
*
432440
* @param i position of the element to return
433441
* @return a reference to the element
@@ -440,7 +448,8 @@ class Vector : protected std::vector<T, Allocator> {
440448
return V::data()[i];
441449
}
442450

443-
/* Assigns a value to an element.
451+
/**
452+
* Assigns a value to an element.
444453
*
445454
* If the element is not present in the vector, it is resized to contain
446455
* at i + 1 values. The other added values are default-initialized.
@@ -455,7 +464,8 @@ class Vector : protected std::vector<T, Allocator> {
455464
V::data()[i] = std::move(x);
456465
}
457466

458-
/** Concatenates this `Vector` and another `Vector`.
467+
/**
468+
* Concatenates this `Vector` and another `Vector`.
459469
*
460470
* @param other the other `Vector` to append
461471
* @return the concatenation of this `Vector` and the other `Vector`
@@ -466,7 +476,8 @@ class Vector : protected std::vector<T, Allocator> {
466476
return v;
467477
}
468478

469-
/** Appends a `Vector` in place.
479+
/**
480+
* Appends a `Vector` in place.
470481
*
471482
* @param other the `Vector` to append
472483
* @return a reference to the modified `Vector`
@@ -476,7 +487,8 @@ class Vector : protected std::vector<T, Allocator> {
476487
return *this;
477488
}
478489

479-
/** Inserts value before a given position.
490+
/**
491+
* Inserts value before a given position.
480492
*
481493
* @param pos iterator to the position preceding the inserted value
482494
* @param value value to insert

0 commit comments

Comments
 (0)