Skip to content

Commit 61a045c

Browse files
authored
General changes (namespace, deprecated loadFile function) (#7344)
#changelog #core
1 parent f6091a0 commit 61a045c

File tree

5 files changed

+14
-19
lines changed

5 files changed

+14
-19
lines changed

addons/ofxAssimpModelLoader/src/ofxAssimpTexture.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
//
77

88
#include "ofxAssimpTexture.h"
9-
#include "ofConstants.h"
109
#include "ofLog.h"
1110

1211
void ofxAssimpTexture::setup(const ofTexture & texture, std::string texturePath, bool bTexRepeat) {

addons/ofxGui/src/ofxSliderGroup.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#include "ofxSliderGroup.h"
2-
using namespace std;
32

43
template<class VecType>
54
ofxVecSlider_<VecType>::ofxVecSlider_(ofParameter<VecType> value, float width, float height){
@@ -13,7 +12,7 @@ ofxVecSlider_<VecType> * ofxVecSlider_<VecType>::setup(ofParameter<VecType> valu
1312

1413
parameters.clear();
1514
listeners.unsubscribeAll();
16-
const string names[4] = {"x", "y", "z", "w"};
15+
const std::string names[4] = {"x", "y", "z", "w"};
1716

1817
this->value.makeReferenceTo(value);
1918
listeners.push(this->value.newListener(this, & ofxVecSlider_::changeValue));
@@ -130,7 +129,7 @@ ofxColorSlider_<ColorType> * ofxColorSlider_<ColorType>::setup(ofParameter<ofCol
130129
ofxGuiGroup::setup(value.getName(), "", 0, 0);
131130
parameters.clear();
132131

133-
const string names[4] = {"r", "g", "b", "a"};
132+
const std::string names[4] = {"r", "g", "b", "a"};
134133

135134
ofColor_<ColorType> val = value;
136135
ofColor_<ColorType> min = value.getMin();

addons/ofxThreadedImageLoader/src/ofxThreadedImageLoader.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ ofxThreadedImageLoader::~ofxThreadedImageLoader(){
1919

2020
// Load an image from disk.
2121
//--------------------------------------------------------------
22-
void ofxThreadedImageLoader::loadFromDisk(ofImage& image, string filename) {
22+
void ofxThreadedImageLoader::loadFromDisk(ofImage& image, std::string filename) {
2323
nextID++;
2424
ofImageLoaderEntry entry(image);
2525
entry.filename = filename;
@@ -32,7 +32,7 @@ void ofxThreadedImageLoader::loadFromDisk(ofImage& image, string filename) {
3232

3333
// Load an url asynchronously from an url.
3434
//--------------------------------------------------------------
35-
void ofxThreadedImageLoader::loadFromURL(ofImage& image, string url) {
35+
void ofxThreadedImageLoader::loadFromURL(ofImage& image, std::string url) {
3636
nextID++;
3737
ofImageLoaderEntry entry(image);
3838
entry.url = url;

addons/ofxThreadedImageLoader/src/ofxThreadedImageLoader.h

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,16 @@
33
#include "ofThread.h"
44
#include "ofImage.h"
55
#include "ofURLFileLoader.h"
6-
#include "ofTypes.h"
6+
#include "ofTypes.h"
77
#include "ofThreadChannel.h"
88

9-
10-
using namespace std;
11-
129
class ofxThreadedImageLoader : public ofThread {
1310
public:
1411
ofxThreadedImageLoader();
1512
~ofxThreadedImageLoader();
1613

17-
void loadFromDisk(ofImage& image, string file);
18-
void loadFromURL(ofImage& image, string url);
14+
void loadFromDisk(ofImage& image, std::string file);
15+
void loadFromURL(ofImage& image, std::string url);
1916

2017

2118

@@ -26,6 +23,7 @@ class ofxThreadedImageLoader : public ofThread {
2623

2724
// Entry to load.
2825
struct ofImageLoaderEntry {
26+
public:
2927
ofImageLoaderEntry() {
3028
image = NULL;
3129
}
@@ -34,18 +32,18 @@ class ofxThreadedImageLoader : public ofThread {
3432
image = &pImage;
3533
}
3634
ofImage* image;
37-
string filename;
38-
string url;
39-
string name;
35+
std::string filename;
36+
std::string url;
37+
std::string name;
4038
};
4139

4240

43-
typedef map<string, ofImageLoaderEntry>::iterator entry_iterator;
41+
typedef std::map<std::string, ofImageLoaderEntry>::iterator entry_iterator;
4442

4543
int nextID;
4644
int lastUpdate;
4745

48-
map<string,ofImageLoaderEntry> images_async_loading; // keeps track of images which are loading async
46+
std::map<std::string,ofImageLoaderEntry> images_async_loading; // keeps track of images which are loading async
4947
ofThreadChannel<ofImageLoaderEntry> images_to_load_from_disk;
5048
ofThreadChannel<ofImageLoaderEntry> images_to_update;
5149
};

addons/ofxXmlSettings/src/ofxXmlSettings.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ static vector<string> tokenize(const string & str, const string & delim)
2828
}
2929
return tokens;
3030
}
31-
//----------------------------------------
3231

3332
//----------------------------------------
3433
ofxXmlSettings::ofxXmlSettings():
@@ -48,7 +47,7 @@ ofxXmlSettings::ofxXmlSettings(const string& xmlFile):
4847
//we do this so that we have a valid handle
4948
//without the need for loadFile
5049
storedHandle = TiXmlHandle(&doc);
51-
loadFile(xmlFile);
50+
load(xmlFile);
5251
}
5352

5453
//---------------------------------------------------------

0 commit comments

Comments
 (0)