/vqdr/trunk

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/vqdr/trunk

« back to all changes in this revision

Viewing changes to src/utils/named_vector.vala

  • Committer: Gustav Hartvigsson
  • Date: 2024-12-21 22:39:17 UTC
  • Revision ID: gustav.hartvigsson@gmail.com-20241221223917-jbt2ylyz9nxjss49
various changes
[utils/utils.vala]
* Removed uneeded int32_abs function

[utils/stack]
* more informative error when trying to pop an empty stack.

[utils/random.vala]
* added c_names to functions (probobly not needed).

[utils/pair.vala]
* Made compact
* made FreeFunc delegates unowned to fix error
* added constructor Pair.with_free_func ().

[utils/named_vector.vala]
* made class compact.

[utils/meson.build]
* Reordered files in list
* added logger.vala.

[utils/logger.vala]
* Added fast and easy logger class.

[utils/fast_number.vala]
* added a bunch of cname CCode attributes.

[general]
* Spelling in comments and functions.

[meson.build]
* Made dependancies easier to read
* added vala posix dependency

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
[CCode (cname = "V", cprefix = "v_")]
7
7
namespace Utils {
8
8
  [CCode (cname = "VNamedVector", cprefix = "v_named_vector_")]
 
9
  [Compact]
9
10
  public class NamedVector<T> {
10
11
    public T[] values;
11
12
    public string[] names;
25
26
      size_t i = 1;
26
27
 
27
28
      while (tmp_name != null && tmp_val != null) {
28
 
        T_buf[i] = tmp_val; N_buf[i] = tmp_name;
 
29
        T_buf[i] = tmp_val;
 
30
        N_buf[i] = tmp_name;
29
31
        i++;
30
32
        tmp_name = list.arg<string?> ();
31
33
        tmp_val = list.arg<T?> ();