Ignore:
Timestamp:
Aug 23, 2017, 9:02:41 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:
7ece922
Parents:
d3e4d6c
Message:

change stdlib swap to use references, and update swap tests

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/libcfa/stdlib.c

    rd3e4d6c rcb811ac  
    1010// Created On       : Thu Jan 28 17:10:29 2016
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Tue Aug  8 17:31:13 2017
    13 // Update Count     : 291
     12// Last Modified On : Wed Aug 23 20:30:44 2017
     13// Update Count     : 292
    1414//
    1515
     
    305305
    306306forall( otype T )
    307 void swap( T * t1, T * t2 ) {
    308         T temp = *t1;
    309         *t1 = *t2;
    310         *t2 = temp;
     307void swap( T & t1, T & t2 ) {
     308        T temp = t1;
     309        t1 = t2;
     310        t2 = temp;
    311311} // swap
    312312
Note: See TracChangeset for help on using the changeset viewer.