Natools

Check-in [6fad53c7fc]
Login
Overview
Comment:s_expressions-encodings: replace assert-in-loop by asserting a slice comparison
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 6fad53c7fc5f82d1bdfe7e89123e69333c4919de
User & Date: nat on 2014-06-21 19:52:49
Other Links: manifest | tags
Context
2014-07-03
18:05
hmac-pinentry: new POSIX-only package to retrieve HMAC key using pinentry protocol check-in: 9b0bfa42ad user: nat tags: trunk
2014-06-21
19:52
s_expressions-encodings: replace assert-in-loop by asserting a slice comparison check-in: 6fad53c7fc user: nat tags: trunk
2014-06-20
20:04
generate_static_hash_map: add a target directory command-line option check-in: 02abd531c8 user: nat tags: trunk
Changes

Modified src/natools-s_expressions-encodings.adb from [6be873c8b5] to [e78bc3f122].

366
367
368
369
370
371
372
373
374


375
376
377
378
379
380
381
382
366
367
368
369
370
371
372


373
374

375
376
377
378
379
380
381







-
-
+
+
-







   begin
      for I in Result'Range loop
         if Result (I) = Plus then
            Result (I) := Digit_62;
         elsif Result (I) = Slash then
            Result (I) := Digit_63;
         elsif Result (I) = Base64_Filler then
            for J in I + 1 .. Result'Last loop
               pragma Assert (Result (J) = Base64_Filler);
            pragma Assert (Result (I + 1 .. Result'Last)
              = (I + 1 .. Result'Last => Base64_Filler));
            end loop;
            Last := I - 1;
            exit;
         end if;
      end loop;

      return Result (Result'First .. Last);
   end Encode_Base64;