Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

more .h includes simplification #8187

Open
wants to merge 21 commits into
base: master
Choose a base branch
from
1 change: 1 addition & 0 deletions addons/ofxiOS/src/utils/ofxiOSExternalDisplay.mm
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

#include "ofxiOSExternalDisplay.h"
#include <TargetConditionals.h>
#include <vector>

using std::vector;

Expand Down
1 change: 1 addition & 0 deletions libs/openFrameworks/3d/of3dPrimitives.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

#include "ofMesh.h"
#include "ofNode.h"
#include <vector>

class ofTexture;
class ofVboMesh;
Expand Down
1 change: 1 addition & 0 deletions libs/openFrameworks/3d/ofMesh.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#define OF_MESH_H

#include "ofGLUtils.h"
#include <vector>

template<class V, class N, class C, class T>
class ofMeshFace_;
Expand Down
1 change: 1 addition & 0 deletions libs/openFrameworks/communication/ofSerial.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

// MARK: ofConstants targets
#include "ofConstants.h"
#include <vector>

class ofBuffer;

Expand Down
2 changes: 2 additions & 0 deletions libs/openFrameworks/gl/ofGLUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@
#pragma once

#include "ofGraphicsConstants.h"
#include <vector>
// MARK: Targets / Defines
//#include "ofConstants.h"


class ofShader;
class ofGLProgrammableRenderer;
class ofBaseGLRenderer;
Expand Down
3 changes: 2 additions & 1 deletion libs/openFrameworks/gl/ofShader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include "ofxAndroidUtils.h"
#endif
#include <regex>
#include <vector>

using std::endl;
using std::ostringstream;
Expand Down Expand Up @@ -958,7 +959,7 @@ void ofShader::setUniformTexture(const string & name, const ofTexture & tex, int
setUniformTexture( name, texData, textureLocation);
}
}

//--------------------------------------------------------------
void ofShader::setUniformTexture(const string & name, const ofTextureData & texData, int textureLocation) const{
if (bLoaded) {
Expand Down
1 change: 1 addition & 0 deletions libs/openFrameworks/gl/ofShader.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

// MARK: ofConstants Targets
#include "ofConstants.h"
#include <vector>

#include <glm/detail/qualifier.hpp>
namespace glm {
Expand Down
2 changes: 2 additions & 0 deletions libs/openFrameworks/graphics/ofPixels.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#include "ofGraphicsConstants.h"
#include "ofPixels.h"
#include "ofColor.h"
#include <string.h> // memcpy
#include <functional> // std::function

static ofImageType getImageTypeFromChannels(size_t channels){
switch(channels){
Expand Down
1 change: 1 addition & 0 deletions libs/openFrameworks/graphics/ofTessellator.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#pragma once

#include "ofGraphicsBaseTypes.h"
#include <vector>

typedef struct TESStesselator TESStesselator;
typedef struct TESSalloc TESSalloc;
Expand Down
1 change: 1 addition & 0 deletions libs/openFrameworks/graphics/ofTrueTypeFont.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include "ofRectangle.h"
#include "ofTexture.h"
#include <unordered_map>
#include <vector>

class ofPath;

Expand Down
12 changes: 12 additions & 0 deletions libs/openFrameworks/ofMain.h
Original file line number Diff line number Diff line change
Expand Up @@ -134,3 +134,15 @@ using std::vector;
using std::weak_ptr;
#endif
#endif


// core: ---------------------------
#include <stdint.h>
#include <cstdio>
#include <cstdlib>
#include <string>
#include <cstring>
#include <iostream>
#include <vector>
#include <memory>
#include <functional>
1 change: 1 addition & 0 deletions libs/openFrameworks/sound/ofSoundBaseTypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// MARK: ofConstants FS
#include "ofConstants.h"
#include <functional>
#include <vector>

class ofSoundBuffer;

Expand Down
11 changes: 1 addition & 10 deletions libs/openFrameworks/utils/ofConstants.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,7 @@
#define OF_VERSION_PATCH 0
#define OF_VERSION_PRE_RELEASE "master"

// core: ---------------------------
#include <stdint.h>
#include <cstdio>
#include <cstdlib>
#include <string>
#include <cstring>
#include <iostream>
#include <vector>
#include <memory>
#include <functional>


// Set to 1 for compatibility with old projects using ofVec instead of glm
#ifndef OF_USE_LEGACY_VECTOR_MATH
Expand Down
1 change: 1 addition & 0 deletions libs/openFrameworks/utils/ofFileUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// MARK: ofConstants FS
#include "ofConstants.h"
#include <fstream>
#include <vector>

//----------------------------------------------------------
// ofBuffer
Expand Down
9 changes: 5 additions & 4 deletions libs/openFrameworks/utils/ofLog.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#include "ofLog.h"
#include <ofUtils.h>
#include <map>
#include <functional> // std::function

#ifdef TARGET_ANDROID
#include "ofxAndroidLogChannel.h"
#endif
Expand Down Expand Up @@ -82,7 +84,7 @@ ofLog::ofLog(){
module = "";
bPrinted = false;
}

//--------------------------------------------------
ofLog::ofLog(ofLogLevel _level){
level = _level;
Expand Down Expand Up @@ -231,7 +233,7 @@ string ofGetLogLevelName(ofLogLevel level, bool pad){

//--------------------------------------------------
void ofConsoleLoggerChannel::log(ofLogLevel level, const string & module, const string & message){
// print to cerr for OF_LOG_ERROR and OF_LOG_FATAL_ERROR, everything else to cout
// print to cerr for OF_LOG_ERROR and OF_LOG_FATAL_ERROR, everything else to cout
std::ostream& out = level < OF_LOG_ERROR ? std::cout : std::cerr;
out << "[" << ofGetLogLevelName(level, true) << "] ";
// only print the module name if it's not ""
Expand All @@ -245,7 +247,7 @@ void ofConsoleLoggerChannel::log(ofLogLevel level, const string & module, const
#ifdef TARGET_WIN32
#include <array>
void ofDebugViewLoggerChannel::log(ofLogLevel level, const string & module, const string & message) {
// print to cerr for OF_LOG_ERROR and OF_LOG_FATAL_ERROR, everything else to cout
// print to cerr for OF_LOG_ERROR and OF_LOG_FATAL_ERROR, everything else to cout
std::stringstream out;
out << "[" << ofGetLogLevelName(level, true) << "] ";
// only print the module name if it's not ""
Expand Down Expand Up @@ -287,4 +289,3 @@ void ofFileLoggerChannel::log(ofLogLevel level, const string & module, const str
}
file << message << std::endl;
}

1 change: 1 addition & 0 deletions libs/openFrameworks/utils/ofLog.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// Only private ofFile file;
#include "ofFileUtils.h"
#include <sstream>
#include <vector>



Expand Down
1 change: 1 addition & 0 deletions libs/openFrameworks/utils/ofThread.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include "ofThread.h"
#include "ofLog.h"
#include <functional>

#ifdef TARGET_ANDROID
#include <jni.h>
Expand Down
1 change: 1 addition & 0 deletions libs/openFrameworks/utils/ofTimerFps.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include "ofTimerFps.h"
#include <thread>

using namespace std::chrono;
using namespace std::chrono_literals;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,6 @@
BFB0B4072C50E019008FB5A3 /* zlib.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = BF7E591D2BA2057900E5C52E /* zlib.xcframework */; };
BFB0B4082C50E019008FB5A3 /* uriparser.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = BF7E591B2BA2056600E5C52E /* uriparser.xcframework */; };
BFB0B4092C50E019008FB5A3 /* tess2.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = BF7E59192BA2054700E5C52E /* tess2.xcframework */; };
BFB0B40A2C50E019008FB5A3 /* pugixml.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = BF7E59172BA2052D00E5C52E /* pugixml.xcframework */; };
BFB0B40B2C50E019008FB5A3 /* libpng.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = BF7E59132BA2050B00E5C52E /* libpng.xcframework */; };
BFB0B40C2C50E019008FB5A3 /* freetype.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = BF7E590D2BA204D300E5C52E /* freetype.xcframework */; };
BFB0B40D2C50E019008FB5A3 /* fmt.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = BF7E590B2BA204BC00E5C52E /* fmt.xcframework */; };
Expand Down Expand Up @@ -376,7 +375,6 @@
BF7E590B2BA204BC00E5C52E /* fmt.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = fmt.xcframework; path = ../../../fmt/lib/macos/fmt.xcframework; sourceTree = "<group>"; };
BF7E590D2BA204D300E5C52E /* freetype.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = freetype.xcframework; path = ../../../freetype/lib/macos/freetype.xcframework; sourceTree = "<group>"; };
BF7E59132BA2050B00E5C52E /* libpng.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = libpng.xcframework; path = ../../../libpng/lib/macos/libpng.xcframework; sourceTree = "<group>"; };
BF7E59172BA2052D00E5C52E /* pugixml.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = pugixml.xcframework; path = ../../../pugixml/lib/macos/pugixml.xcframework; sourceTree = "<group>"; };
BF7E59192BA2054700E5C52E /* tess2.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = tess2.xcframework; path = ../../../tess2/lib/macos/tess2.xcframework; sourceTree = "<group>"; };
BF7E591B2BA2056600E5C52E /* uriparser.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = uriparser.xcframework; path = ../../../uriparser/lib/macos/uriparser.xcframework; sourceTree = "<group>"; };
BF7E591D2BA2057900E5C52E /* zlib.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = zlib.xcframework; path = ../../../zlib/lib/macos/zlib.xcframework; sourceTree = "<group>"; };
Expand Down Expand Up @@ -524,7 +522,6 @@
BFB0B4072C50E019008FB5A3 /* zlib.xcframework in Frameworks */,
BFB0B4082C50E019008FB5A3 /* uriparser.xcframework in Frameworks */,
BFB0B4092C50E019008FB5A3 /* tess2.xcframework in Frameworks */,
BFB0B40A2C50E019008FB5A3 /* pugixml.xcframework in Frameworks */,
BFB0B40B2C50E019008FB5A3 /* libpng.xcframework in Frameworks */,
BFB0B40C2C50E019008FB5A3 /* freetype.xcframework in Frameworks */,
BFB0B40D2C50E019008FB5A3 /* fmt.xcframework in Frameworks */,
Expand Down Expand Up @@ -1001,7 +998,6 @@
BF7E591D2BA2057900E5C52E /* zlib.xcframework */,
BF7E591B2BA2056600E5C52E /* uriparser.xcframework */,
BF7E59192BA2054700E5C52E /* tess2.xcframework */,
BF7E59172BA2052D00E5C52E /* pugixml.xcframework */,
BF7E59132BA2050B00E5C52E /* libpng.xcframework */,
BF7E590D2BA204D300E5C52E /* freetype.xcframework */,
BF7E590B2BA204BC00E5C52E /* fmt.xcframework */,
Expand Down
Loading