Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/helpers.cpp

    rce5ac3 r042f82  
    11/** \file helpers.cpp
    22 *
    3  * Implementation of some auxiliary functions for memory dis-/allocation and so on 
     3 * Implementation of some auxiliary functions for memory dis-/allocation and so on
    44 */
    55
     
    2020    cin >> test;
    2121  } while (test == 0.1439851348959832147598734598273456723948652983045928346598365);
    22   return test;   
     22  return test;
    2323};
    2424
     
    4040 * \return pointer to memory range
    4141 */
    42 void * Malloc(size_t size, const char* output) 
     42void * Malloc(size_t size, const char* output)
    4343{
    4444  void *buffer = NULL;
     
    5454 * \return pointer to memory range
    5555 */
    56 void * Calloc(size_t size, const char* output) 
     56void * Calloc(size_t size, const char* output)
    5757{
    5858  void *buffer = NULL;
     
    6969 * \return pointer to memory range
    7070 */
    71 void * ReAlloc(void * OldPointer, size_t size, const char* output) 
     71void * ReAlloc(void * OldPointer, size_t size, const char* output)
    7272{
    7373  void *buffer = NULL;
     
    8686 * \param *output message if free fails
    8787 */
    88 void Free(void ** buffer, const char* output) 
     88void Free(void ** buffer, const char* output)
    8989{
    9090  if (*buffer == NULL) {
     
    101101 * \return pointer to string array
    102102 */
    103 char* MallocString(size_t size, const char* output) 
     103char* MallocString(size_t size, const char* output)
    104104{
    105105  size_t i;
     
    123123  double step = (upper_bound - lower_bound);
    124124  while (*b >= upper_bound)
    125     *b -= step;   
     125    *b -= step;
    126126  while (*b < lower_bound)
    127     *b += step;   
    128 }; 
     127    *b += step;
     128};
    129129
    130130/** Flips two doubles.
     
    170170  }
    171171  // allocate string
    172   returnstring = (char *) Malloc(sizeof(char)*(order+2), "MoleculeListClass::CreateFragmentNumberForOutput: *returnstring");
     172  returnstring = (char *) Malloc(sizeof(char)*(order+2), "FixedDigitNumber: *returnstring");
    173173  // terminate  and fill string array from end backward
    174174  returnstring[order] = '\0';
     
    186186 * \return true - is a number, false - is not a valid number
    187187 */
    188 bool IsValidNumber( const char *string) 
     188bool IsValidNumber( const char *string)
    189189{
    190190  int ptr = 0;
Note: See TracChangeset for help on using the changeset viewer.