Changeset c0b4db0


Ignore:
Timestamp:
Feb 17, 2018, 2:08:52 PM (7 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
d4933b3
Parents:
14cbfad
Message:

add extra constructor, formatting

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/tests/sum.c

    r14cbfad rc0b4db0  
    1111// Created On       : Wed May 27 17:56:53 2015
    1212// Last Modified By : Peter A. Buhr
    13 // Last Modified On : Fri Jan 26 11:31:02 2018
    14 // Update Count     : 271
     13// Last Modified On : Sat Feb 17 11:49:17 2018
     14// Update Count     : 273
    1515//
    1616
     
    8484        struct S { int i, j; };
    8585        void ?{}( S & s ) { s.[i, j] = 0; }
    86         void ?{}( S & s, int i, int j ) { s.[i,j] = [i, j]; }
    87         void ?{}( S & s, zero_t ) { s.[i,j] = 0; }
    88         void ?{}( S & s, one_t ) { s.[i,j] = 1; }
     86        void ?{}( S & s, int i ) { s.[i, j] = [i, 0]; }
     87        void ?{}( S & s, int i, int j ) { s.[i, j] = [i, j]; }
     88        void ?{}( S & s, zero_t ) { s.[i, j] = 0; }
     89        void ?{}( S & s, one_t ) { s.[i, j] = 1; }
    8990        S ?+?( S t1, S t2 ) { return (S){ t1.i + t2.i, t1.j + t2.j }; }
    9091        S ?+=?( S & t1, S t2 ) { t1 = t1 + t2; return t1; }
Note: See TracChangeset for help on using the changeset viewer.