/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/libvqdr/function/abstract_pool_token.vala

  • Committer: Gustav Hartvigsson
  • Date: 2022-06-01 12:09:53 UTC
  • mto: This revision was merged to the branch mainline in revision 55.
  • Revision ID: gustav.hartvigsson@gmail.com-20220601120953-3t2j3v68izknnmyw
int -> int32

Finished the last of the convertion to fixed sized integer values.
(where applicable).

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
  }
9
9
 
10
10
  protected override void evaluate_self (Context instance) throws GLib.Error {
11
 
    int roll_res = 0;
12
 
    int pool_size = 0;
13
 
    int successes = 0;
 
11
    int32 roll_res = 0;
 
12
    int32 pool_size = 0;
 
13
    int32 successes = 0;
14
14
 
15
15
    this.result_value.number = 0;
16
16
 
26
26
    }
27
27
 
28
28
    bool is_roll_again;
29
 
    int total_roll_number = 0;
 
29
    int32 total_roll_number = 0;
30
30
    // XXX
31
 
    for (int i = 1; i <= pool_size; i++) {
 
31
    for (int32 i = 1; i <= pool_size; i++) {
32
32
      is_roll_again = false;
33
33
      do {
34
34
        if (strbldr.len < MAX_TOKEN_STRING_LENGTH) {
102
102
   *
103
103
   * @return ''true'' if another roll is required, ''false'' otherwise.
104
104
   */
105
 
  protected virtual bool roll_again (Context instance, int roll_result, int pool_roll_number) {
 
105
  protected virtual bool roll_again (Context instance, int32 roll_result, int32 pool_roll_number) {
106
106
    return false;
107
107
  }
108
108
 
114
114
  /**
115
115
   * Return the pool size, or the number of rolls to performe.
116
116
   */
117
 
  protected abstract int get_pool_size (Context instance);
 
117
  protected abstract int32 get_pool_size (Context instance);
118
118
 
119
119
  /**
120
120
   * Returns the index of the parameter that contains the pool_size.
121
121
   */
122
 
  protected abstract int get_pool_index ();
 
122
  protected abstract int32 get_pool_index ();
123
123
 
124
124
 
125
125
  /**
126
126
   * Perform a roll and return the result.
127
127
   */
128
 
  protected abstract int get_roll (Context instance) throws GLib.Error;
 
128
  protected abstract int32 get_roll (Context instance) throws GLib.Error;
129
129
 
130
130
  /**
131
131
   * Count the number of successes obtained with this roll.
133
133
   *
134
134
   * @return the number of Successes for this roll.
135
135
   */
136
 
  protected abstract int count_successes (Context instance, int roll_result) throws GLib.Error;
 
136
  protected abstract int32 count_successes (Context instance, int32 roll_result) throws GLib.Error;
137
137
 
138
138
  /**
139
139
   * Used to evetually performe controls after the pool rolls.