Etheram68 пре 5 година
родитељ
комит
9effb6a959
3 измењених фајлова са 6 додато и 5 уклоњено
  1. 2 2
      README.md
  2. 1 1
      package.json
  3. 3 2
      src/template.ts

+ 2 - 2
README.md

@@ -39,8 +39,8 @@ To report a bug or ask for a feature, please open a [Github issue](https://githu
 
 ## Release Notes
 
-### 0.2.6
-First letter is upper, other letter is sensitive case
+### 0.2.6 / 0.2.7
+First letter is upper, other letter is sensitive case And modify Template
 
 ### 0.2.3 / 0.2.5
 Modify template for align call function on cpp file

+ 1 - 1
package.json

@@ -2,7 +2,7 @@
 	"name": "canonicalclasscpp",
 	"displayName": "42 Canonical Class CPP",
 	"description": "This extension is to automatically create a canonical hpp and cpp file",
-	"version": "0.2.6",
+	"version": "0.2.7",
 	"publisher": "frfreyCanonicalClassCPP",
 	"icon": "42.png",
 	"repository": {

+ 3 - 2
src/template.ts

@@ -36,7 +36,7 @@ export const getTemplate = ( name: string | undefined, filePathCpp: vscode.Uri ,
 						name + "::~" + name + "()\n{\n	std::cout << \"Destructor called\" << std::endl;\n}\n\n" +
 						"\n/*\n** --------------------------------- OVERLOAD ---------------------------------\n*/\n\n" +
 						name + " &				" + name + "::operator=( " + name + " const & rhs )\n{\n	//if ( this != &rhs )\n" +
-						"		//this->_value = rhs.getValue();\n" +
+						"	//{\n		//this->_value = rhs.getValue();\n	//}\n" +
 						"	return *this;\n}\n\n" +
 						"std::ostream &			operator<<( std::ostream & o, " + name + " const & i )\n" +
 						"{\n	//o << \"Value = \" << i.getValue();\n	return o;\n}\n\n" +
@@ -45,7 +45,8 @@ export const getTemplate = ( name: string | undefined, filePathCpp: vscode.Uri ,
 
 		let classhpp =	"#ifndef " + name.toUpperCase() + "_CLASS" + "_HPP\n" +
 						"# define " + name.toUpperCase() + "_CLASS" + "_HPP\n\n" +
-						"# include <iostream>\n\n" +
+						"# include <iostream>\n" +
+						"# include <string>\n\n" +
 						"class " + name + "\n{\n" +
 						"\n" +
 						"	public:\n" +