summaryrefslogtreecommitdiffstats
path: root/src/qalculate_tde_utils.cpp
diff options
context:
space:
mode:
authoraneejit1 <aneejit1@gmail.com>2020-11-11 00:22:16 +0000
committeraneejit1 <aneejit1@gmail.com>2020-11-13 15:13:37 +0000
commit208f77024e5231bffa800964b1123cbde8fa3f29 (patch)
treeec19896681c321fd70d52befdcea62559597eeb4 /src/qalculate_tde_utils.cpp
parent7cbf6dffbb0ec5521db6136b39d35fd9e98663ee (diff)
downloadqalculate-tde-208f77024e5231bffa800964b1123cbde8fa3f29.tar.gz
qalculate-tde-208f77024e5231bffa800964b1123cbde8fa3f29.zip
Fix undeclared declarations of string/vector/list; prefix declarations with 'std::'
Signed-off-by: aneejit1 <aneejit1@gmail.com>
Diffstat (limited to 'src/qalculate_tde_utils.cpp')
-rw-r--r--src/qalculate_tde_utils.cpp35
1 files changed, 19 insertions, 16 deletions
diff --git a/src/qalculate_tde_utils.cpp b/src/qalculate_tde_utils.cpp
index fb34e9a..4bfaf65 100644
--- a/src/qalculate_tde_utils.cpp
+++ b/src/qalculate_tde_utils.cpp
@@ -19,6 +19,9 @@
***************************************************************************/
#include "qalculate_tde_utils.h"
+#include <vector>
+#include <string>
+#include <list>
#include <tqwidget.h>
#include <tqlabel.h>
#include <tqlineedit.h>
@@ -28,10 +31,10 @@
#include "kqalculate.h"
tree_struct function_cats, unit_cats, variable_cats;
-vector<void*> ia_units, ia_variables, ia_functions;
-vector<MathFunction*> recent_functions;
-vector<Variable*> recent_variables;
-vector<Unit*> recent_units;
+std::vector<void*> ia_units, ia_variables, ia_functions;
+std::vector<MathFunction*> recent_functions;
+std::vector<Variable*> recent_variables;
+std::vector<Unit*> recent_units;
extern PrintOptions printops;
extern KnownVariable *vans[5];
extern TQWidget *topWidget;
@@ -81,13 +84,13 @@ bool can_display_unicode_string_function(const char *str, void *arg) {
void generate_units_tree_struct() {
size_t cat_i, cat_i_prev;
bool b;
- string str, cat, cat_sub;
+ std::string str, cat, cat_sub;
Unit *u = NULL;
unit_cats.items.clear();
unit_cats.objects.clear();
unit_cats.parent = NULL;
ia_units.clear();
- list<tree_struct>::iterator it;
+ std::list<tree_struct>::iterator it;
for(size_t i = 0; i < CALCULATOR->units.size(); i++) {
if(!CALCULATOR->units[i]->isActive()) {
b = false;
@@ -107,7 +110,7 @@ void generate_units_tree_struct() {
cat_i = cat.find("/"); cat_i_prev = 0;
b = false;
while(true) {
- if(cat_i == string::npos) {
+ if(cat_i == std::string::npos) {
cat_sub = cat.substr(cat_i_prev, cat.length() - cat_i_prev);
} else {
cat_sub = cat.substr(cat_i_prev, cat_i - cat_i_prev);
@@ -129,7 +132,7 @@ void generate_units_tree_struct() {
item = &*it;
item->item = cat_sub;
}
- if(cat_i == string::npos) {
+ if(cat_i == std::string::npos) {
break;
}
cat_i_prev = cat_i + 1;
@@ -156,13 +159,13 @@ void generate_variables_tree_struct() {
size_t cat_i, cat_i_prev;
bool b;
- string str, cat, cat_sub;
+ std::string str, cat, cat_sub;
Variable *v = NULL;
variable_cats.items.clear();
variable_cats.objects.clear();
variable_cats.parent = NULL;
ia_variables.clear();
- list<tree_struct>::iterator it;
+ std::list<tree_struct>::iterator it;
for(size_t i = 0; i < CALCULATOR->variables.size(); i++) {
if(!CALCULATOR->variables[i]->isActive()) {
//deactivated variable
@@ -183,7 +186,7 @@ void generate_variables_tree_struct() {
cat_i = cat.find("/"); cat_i_prev = 0;
b = false;
while(true) {
- if(cat_i == string::npos) {
+ if(cat_i == std::string::npos) {
cat_sub = cat.substr(cat_i_prev, cat.length() - cat_i_prev);
} else {
cat_sub = cat.substr(cat_i_prev, cat_i - cat_i_prev);
@@ -205,7 +208,7 @@ void generate_variables_tree_struct() {
item = &*it;
item->item = cat_sub;
}
- if(cat_i == string::npos) {
+ if(cat_i == std::string::npos) {
break;
}
cat_i_prev = cat_i + 1;
@@ -232,13 +235,13 @@ void generate_functions_tree_struct() {
size_t cat_i, cat_i_prev;
bool b;
- string str, cat, cat_sub;
+ std::string str, cat, cat_sub;
MathFunction *f = NULL;
function_cats.items.clear();
function_cats.objects.clear();
function_cats.parent = NULL;
ia_functions.clear();
- list<tree_struct>::iterator it;
+ std::list<tree_struct>::iterator it;
for(size_t i = 0; i < CALCULATOR->functions.size(); i++) {
if(!CALCULATOR->functions[i]->isActive()) {
@@ -260,7 +263,7 @@ void generate_functions_tree_struct() {
cat_i = cat.find("/"); cat_i_prev = 0;
b = false;
while(true) {
- if(cat_i == string::npos) {
+ if(cat_i == std::string::npos) {
cat_sub = cat.substr(cat_i_prev, cat.length() - cat_i_prev);
} else {
cat_sub = cat.substr(cat_i_prev, cat_i - cat_i_prev);
@@ -282,7 +285,7 @@ void generate_functions_tree_struct() {
item = &*it;
item->item = cat_sub;
}
- if(cat_i == string::npos) {
+ if(cat_i == std::string::npos) {
break;
}
cat_i_prev = cat_i + 1;