<commit_before>//
//  ex13_11.h
//
//  Created by pezy on 1/13/15.
//  Copyright (c) 2015 pezy. All rights reserved.
//
//  Add a destructor to your HasPtr class from the previous exercises.
//
//  See ex13_08.h
//

class HasPtr {
public:
    HasPtr(const string &s = string()) : ps(new string(s)), i(0) {}
    HasPtr(const HasPtr &hp) : ps(new string(*hp.ps)), i(hp.i) {}
    HasPtr &operator=(const HasPtr &hp)
    {
        delete ps;
        ps=new string(*hp.ps);
        i=hp.i;
        return *this;
    }
    ~HasPtr() {delete ps;}
private:<commit_msg>Update ex13_11.h<commit_after>//
//  ex13_11.h
//
//  Created by pezy on 1/13/15.
//  Copyright (c) 2015 pezy. All rights reserved.
//
//  Add a destructor to your HasPtr class from the previous exercises.
//
//  See ex13_08.h
//

class HasPtr {
public:
    HasPtr(const string &s = string()) : ps(new string(s)), i(0) {}
    HasPtr(const HasPtr &hp) : ps(new string(*hp.ps)), i(hp.i) {}
    HasPtr &operator=(const HasPtr &hp)
    {
        auto newp=new string(*hp.ps);
        delete ps;
        ps=newp;
        i=hp.i;
        return *this;
    }
    ~HasPtr() {delete ps;}
private:
{'fraction_non_alphanumeric': 0.16477768090671316, 'fraction_numerical': 0.03487358326068003, 'mean_word_length': 2.2893982808022924, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5580703', 'n_tokens_mistral': 452, 'n_tokens_neox': 427, 'n_words': 118}