<commit_before>/* ************************************************************************** */
/*                                                                            */
/*                                                        :::      ::::::::   */
/*   newoctree.c                                        :+:      :+:    :+:   */
/*                                                    +:+ +:+         +:+     */
/*   By: elee <<EMAIL>>              +#+  +:+       +#+        */
/*                                                +#+#+#+#+#+   +#+           */
/*   Created: 2017/05/08 19:46:04 by elee              #+#    #+#             */
/*   Updated: 2017/05/10 18:16:53 by elee             ###   ########.fr       */
/*                                                                            */
/* ************************************************************************** */

#include "checker.h"
#include <stdlib.h>

void        createchildren(t_octant *node)
{
    int     i;
	int		j;

    i = 0;
    while (i < 8)
    {
        node->children[i] = (t_octant*)malloc(sizeof(t_octant));
        node->children[i]->parent = node;
        node->children[i]->bodies = node->bodies;
        node->children[i]->children = (t_octant**)malloc(sizeof(t_octant) * 8);
		j = 0;
		while (j < 8)
		{
			node->children[i]->children[j] = NULL;
			j++;
		}
        i++;
    }
}<commit_msg>removed uneccesary while loop<commit_after>/* ************************************************************************** */
/*                                                                            */
/*                                                        :::      ::::::::   */
/*   octree.c                                           :+:      :+:    :+:   */
/*                                                    +:+ +:+         +:+     */
/*   By: elee <<EMAIL>>              +#+  +:+       +#+        */
/*                                                +#+#+#+#+#+   +#+           */
/*   Created: 2017/05/08 19:46:04 by elee              #+#    #+#             */
/*   Updated: 2017/05/10 18:24:25 by smifsud          ###   ########.fr       */
/*                                                                            */
/* ************************************************************************** */

#include "checker.h"
#include <stdlib.h>

void        createchildren(t_octant *node)
{
    int     i;

    i = 0;
    while (i < 8)
    {
        node->children[i] = (t_octant*)malloc(sizeof(t_octant));
        node->children[i]->parent = node;
        node->children[i]->bodies = node->bodies;
        node->children[i]->children = (t_octant**)malloc(sizeof(t_octant) * 8);
		node->children[i]->children[0] = 0;
        i++;
    }
}
{'fraction_non_alphanumeric': 0.2685860058309038, 'fraction_numerical': 0.024052478134110787, 'mean_word_length': 0.9920174165457184, 'pattern_counts': {'":': 0, '<': 12, '<?xml version=': 0, '>': 29, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 30, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1180974', 'n_tokens_mistral': 784, 'n_tokens_neox': 694, 'n_words': 95}